Loading app/src/androidTest/java/org/mozilla/fenix/syncintegration/SyncIntegrationTest.kt +12 −17 Original line number Diff line number Diff line Loading @@ -46,9 +46,6 @@ class SyncIntegrationTest { }.openHistory { } historyAfterSyncIsShown() } /* These tests will be running in the future // once the test above runs successfully and // the environment is stable // Bookmark item Desktop -> Fenix @Test Loading @@ -62,6 +59,10 @@ class SyncIntegrationTest { bookmarkAfterSyncIsShown() } /* These tests will be running in the future // once the test above runs successfully and // the environment is stable // History item Fenix -> Desktop @Test fun checkBookmarkFromDeviceTest() { Loading Loading @@ -99,7 +100,7 @@ class SyncIntegrationTest { continueButton.clickAndWait(Until.newWindow(), TestAssetHelper.waitingTime) } fun typePassowrd() { fun typePassword() { val passwordInput = mDevice.findObject(UiSelector() .instance(0) .className(EditText::class.java)) Loading @@ -109,7 +110,7 @@ class SyncIntegrationTest { } fun tapOnSignIn() { mDevice.wait(Until.findObjects(By.text("Sign in")), TestAssetHelper.waitingTime) mDevice.wait(Until.findObjects(By.text("Sign in")), TestAssetHelper.waitingTimeShort) // Let's tap on enter, sometimes depending on the device the sign in button is // hidden by the keyboard mDevice.pressEnter() Loading @@ -126,8 +127,8 @@ class SyncIntegrationTest { } fun bookmarkAfterSyncIsShown() { val bookmarkyEntry = mDevice.findObject(By.text("Example Domain")) bookmarkyEntry.isEnabled() val bookmarkEntry = mDevice.findObject(By.text("Example Domain")) bookmarkEntry.isEnabled() } fun seeBookmark() { Loading @@ -137,14 +138,8 @@ class SyncIntegrationTest { } fun tapReturnToPreviousApp() { mDevice.wait(Until.findObjects(By.text("Connected")), TestAssetHelper.waitingTime) val settingsLabel = mDevice.wait(Until.findObject(By.text("Settings")), TestAssetHelper.waitingTime) settingsLabel.isClickable() mDevice.wait(Until.findObjects(By.desc("Navigate up")), TestAssetHelper.waitingTime) val backButton = mDevice.findObject(By.desc("Navigate up")) backButton.click() sleep(TestAssetHelper.waitingTime) mDevice.pressBack() } fun signInFxSync() { Loading @@ -157,8 +152,8 @@ class SyncIntegrationTest { typeEmail() tapOnContinueButton() typePassowrd() sleep(TestAssetHelper.waitingTime) typePassword() sleep(TestAssetHelper.waitingTimeShort) tapOnSignIn() } } Loading app/src/androidTest/java/org/mozilla/fenix/syncintegration/test_bookmark.js +4 −3 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ var phases = { "phase1": "profile1" }; // expected bookmark state var bookmarksExpected = { var bookmarksCreated = { "mobile": [{ uri: "http://www.example.com/", title: "Example Domain"}] Loading @@ -21,5 +21,6 @@ var bookmarksExpected = { // sync and verify bookmarks Phase("phase1", [ [Sync], [Bookmarks.verify, bookmarksExpected], [Bookmarks.add, bookmarksCreated], [Sync] ]); No newline at end of file app/src/androidTest/java/org/mozilla/fenix/syncintegration/test_integration.py +5 −7 Original line number Diff line number Diff line Loading @@ -3,12 +3,10 @@ import sys def test_sync_history_from_desktop(tps, gradlewbuild): # Running tests tps.run('test_history.js') gradlewbuild.test('checkHistoryFromDesktopTest') ''' # For the future, this way we change the test to run.... def test_sync_bookmark_from_device(tps, xcodebuild): gradlewbuild.test('checkBookmarkFromDeviceTest') tps.run('app/src/androidTest/java/org/mozilla/fenix/ui/SyncIntegrationTests/test_bookmark.js') ''' No newline at end of file def test_sync_bookmark_from_device(tps, gradlewbuild): os.chdir('app/src/androidTest/java/org/mozilla/fenix/syncintegration/') tps.run('test_bookmark.js') gradlewbuild.test('checkBookmarkFromDesktopTest') Loading
app/src/androidTest/java/org/mozilla/fenix/syncintegration/SyncIntegrationTest.kt +12 −17 Original line number Diff line number Diff line Loading @@ -46,9 +46,6 @@ class SyncIntegrationTest { }.openHistory { } historyAfterSyncIsShown() } /* These tests will be running in the future // once the test above runs successfully and // the environment is stable // Bookmark item Desktop -> Fenix @Test Loading @@ -62,6 +59,10 @@ class SyncIntegrationTest { bookmarkAfterSyncIsShown() } /* These tests will be running in the future // once the test above runs successfully and // the environment is stable // History item Fenix -> Desktop @Test fun checkBookmarkFromDeviceTest() { Loading Loading @@ -99,7 +100,7 @@ class SyncIntegrationTest { continueButton.clickAndWait(Until.newWindow(), TestAssetHelper.waitingTime) } fun typePassowrd() { fun typePassword() { val passwordInput = mDevice.findObject(UiSelector() .instance(0) .className(EditText::class.java)) Loading @@ -109,7 +110,7 @@ class SyncIntegrationTest { } fun tapOnSignIn() { mDevice.wait(Until.findObjects(By.text("Sign in")), TestAssetHelper.waitingTime) mDevice.wait(Until.findObjects(By.text("Sign in")), TestAssetHelper.waitingTimeShort) // Let's tap on enter, sometimes depending on the device the sign in button is // hidden by the keyboard mDevice.pressEnter() Loading @@ -126,8 +127,8 @@ class SyncIntegrationTest { } fun bookmarkAfterSyncIsShown() { val bookmarkyEntry = mDevice.findObject(By.text("Example Domain")) bookmarkyEntry.isEnabled() val bookmarkEntry = mDevice.findObject(By.text("Example Domain")) bookmarkEntry.isEnabled() } fun seeBookmark() { Loading @@ -137,14 +138,8 @@ class SyncIntegrationTest { } fun tapReturnToPreviousApp() { mDevice.wait(Until.findObjects(By.text("Connected")), TestAssetHelper.waitingTime) val settingsLabel = mDevice.wait(Until.findObject(By.text("Settings")), TestAssetHelper.waitingTime) settingsLabel.isClickable() mDevice.wait(Until.findObjects(By.desc("Navigate up")), TestAssetHelper.waitingTime) val backButton = mDevice.findObject(By.desc("Navigate up")) backButton.click() sleep(TestAssetHelper.waitingTime) mDevice.pressBack() } fun signInFxSync() { Loading @@ -157,8 +152,8 @@ class SyncIntegrationTest { typeEmail() tapOnContinueButton() typePassowrd() sleep(TestAssetHelper.waitingTime) typePassword() sleep(TestAssetHelper.waitingTimeShort) tapOnSignIn() } } Loading
app/src/androidTest/java/org/mozilla/fenix/syncintegration/test_bookmark.js +4 −3 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ var phases = { "phase1": "profile1" }; // expected bookmark state var bookmarksExpected = { var bookmarksCreated = { "mobile": [{ uri: "http://www.example.com/", title: "Example Domain"}] Loading @@ -21,5 +21,6 @@ var bookmarksExpected = { // sync and verify bookmarks Phase("phase1", [ [Sync], [Bookmarks.verify, bookmarksExpected], [Bookmarks.add, bookmarksCreated], [Sync] ]); No newline at end of file
app/src/androidTest/java/org/mozilla/fenix/syncintegration/test_integration.py +5 −7 Original line number Diff line number Diff line Loading @@ -3,12 +3,10 @@ import sys def test_sync_history_from_desktop(tps, gradlewbuild): # Running tests tps.run('test_history.js') gradlewbuild.test('checkHistoryFromDesktopTest') ''' # For the future, this way we change the test to run.... def test_sync_bookmark_from_device(tps, xcodebuild): gradlewbuild.test('checkBookmarkFromDeviceTest') tps.run('app/src/androidTest/java/org/mozilla/fenix/ui/SyncIntegrationTests/test_bookmark.js') ''' No newline at end of file def test_sync_bookmark_from_device(tps, gradlewbuild): os.chdir('app/src/androidTest/java/org/mozilla/fenix/syncintegration/') tps.run('test_bookmark.js') gradlewbuild.test('checkBookmarkFromDesktopTest')