* Fix #6004: Add UI sync integration test for Bookmarks * fix two typosmaster
parent
fbec001e28
commit
06c1ef49b2
|
@ -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
|
||||
|
@ -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() {
|
||||
|
@ -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))
|
||||
|
@ -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()
|
||||
|
@ -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() {
|
||||
|
@ -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() {
|
||||
|
@ -157,8 +152,8 @@ class SyncIntegrationTest {
|
|||
|
||||
typeEmail()
|
||||
tapOnContinueButton()
|
||||
typePassowrd()
|
||||
sleep(TestAssetHelper.waitingTime)
|
||||
typePassword()
|
||||
sleep(TestAssetHelper.waitingTimeShort)
|
||||
tapOnSignIn()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ var phases = { "phase1": "profile1" };
|
|||
|
||||
|
||||
// expected bookmark state
|
||||
var bookmarksExpected = {
|
||||
var bookmarksCreated = {
|
||||
"mobile": [{
|
||||
uri: "http://www.example.com/",
|
||||
title: "Example Domain"}]
|
||||
|
@ -21,5 +21,6 @@ var bookmarksExpected = {
|
|||
// sync and verify bookmarks
|
||||
Phase("phase1", [
|
||||
[Sync],
|
||||
[Bookmarks.verify, bookmarksExpected],
|
||||
]);
|
||||
[Bookmarks.add, bookmarksCreated],
|
||||
[Sync]
|
||||
]);
|
|
@ -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')
|
||||
'''
|
||||
|
||||
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…
Reference in New Issue