forked from mozilla-mobile/fenix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update UI Sync integration tests and fix TPS preference. (mozilla-mob…
- Loading branch information
1 parent
f7aec4c
commit b432f5c
Showing
5 changed files
with
61 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/src/androidTest/java/org/mozilla/fenix/AppRequestInterceptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package org.mozilla.fenix | ||
|
||
import android.content.Context | ||
import mozilla.components.concept.engine.EngineSession | ||
import mozilla.components.concept.engine.request.RequestInterceptor | ||
import org.mozilla.fenix.ext.components | ||
import org.mozilla.fenix.ui.robots.appContext | ||
|
||
/** | ||
* This class overrides the application's request interceptor to | ||
* deactivate the FxA web channel | ||
* which is not supported on the staging servers. | ||
*/ | ||
|
||
class AppRequestInterceptor(private val context: Context) : RequestInterceptor { | ||
override fun onLoadRequest( | ||
engineSession: EngineSession, | ||
uri: String, | ||
hasUserGesture: Boolean, | ||
isSameDomain: Boolean | ||
): RequestInterceptor.InterceptionResponse? { | ||
return appContext.components.services.accountsAuthFeature.interceptor.onLoadRequest( | ||
engineSession, uri, hasUserGesture, isSameDomain) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
app/src/androidTest/java/org/mozilla/fenix/syncintegration/test_integration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
import os | ||
import sys | ||
|
||
|
||
def test_sync_account_settings(tps, gradlewbuild): | ||
gradlewbuild.test('checkAccountSettings') | ||
|
||
def test_sync_history_from_desktop(tps, gradlewbuild): | ||
os.chdir('app/src/androidTest/java/org/mozilla/fenix/syncintegration/') | ||
tps.run('test_history.js') | ||
gradlewbuild.test('checkHistoryFromDesktopTest') | ||
|
||
''' | ||
def test_sync_bookmark_from_desktop(tps, gradlewbuild): | ||
os.chdir('app/src/androidTest/java/org/mozilla/fenix/syncintegration/') | ||
tps.run('test_bookmark.js') | ||
gradlewbuild.test('checkBookmarkFromDesktopTest') | ||
def test_sync_logins_from_device(tps, gradlewbuild): | ||
def test_sync_logins_from_desktop(tps, gradlewbuild): | ||
os.chdir('app/src/androidTest/java/org/mozilla/fenix/syncintegration/') | ||
tps.run('test_logins.js') | ||
gradlewbuild.test('checkLoginsFromDesktopTest') | ||
def test_sync_bookmark_from_device(tps, gradlewbuild): | ||
os.chdir('app/src/androidTest/java/org/mozilla/fenix/syncintegration/') | ||
gradlewbuild.test('checkBookmarkFromDeviceTest') | ||
tps.run('test_bookmark_desktop.js') | ||
tps.run('app/src/androidTest/java/org/mozilla/fenix/syncintegration/test_bookmark_desktop.js') | ||
def test_sync_history_from_device(tps, gradlewbuild): | ||
os.chdir('app/src/androidTest/java/org/mozilla/fenix/syncintegration/') | ||
gradlewbuild.test('checkHistoryFromDeviceTest') | ||
tps.run('app/src/androidTest/java/org/mozilla/fenix/syncintegration/test_history_desktop.js') | ||
''' |