Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
1127-xcuitests-add-fake-login-ipad (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelrios authored Nov 15, 2019
1 parent 5574ebf commit 414bfa6
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions LockwiseXCUITests/LockwiseXCUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,27 @@ class LockwiseXCUITests: BaseTestCase {
func testDeleteEntry() {
loginToEntryListView()

waitforExistence(app.tables.cells.staticTexts["aaafakeTesterDelete"])
if !iPad() {
waitforExistence(app.tables.cells.staticTexts["aaafakeTesterDelete"])
}

// Need to add firstMatch for iPad case
app.tables.cells.staticTexts["aaafakeTesterDelete"].firstMatch.swipeLeft()
app.tables.cells.staticTexts.firstMatch.swipeLeft()
app.tables.buttons["Delete"].tap()
waitforExistence(app.alerts["Delete this login?"])
// First check the Cancel button
app.alerts.buttons["Cancel"].tap()
waitforExistence(app.tables.cells.staticTexts["aaafakeTesterDelete"])
app.tables.cells.staticTexts["aaafakeTesterDelete"].firstMatch.swipeLeft()
app.tables.buttons["Delete"].tap()
waitforExistence(app.alerts["Delete this login?"])
// Then Delete the login
app.alerts.buttons["Delete"].tap()
waitforExistence(app.navigationBars["firefoxLockwise.navigationBar"])
// Now check that the login has been removed
// On iPad, entry is removed but only from the entry list, the entry detail view is still there
if !iPad() {
waitforExistence(app.tables.cells.staticTexts["aaafakeTesterDelete"])
}
// Deleting login only on iPhone
if !iPad() {
app.tables.cells.staticTexts["aaafakeTesterDelete"].firstMatch.swipeLeft()
app.tables.buttons["Delete"].tap()
waitforExistence(app.alerts["Delete this login?"])
// Then Delete the login
app.alerts.buttons["Delete"].tap()
waitforExistence(app.navigationBars["firefoxLockwise.navigationBar"])
waitforNoExistence(app.tables.cells.staticTexts["aaafakeTesterDelete"])
}
}
Expand Down Expand Up @@ -97,6 +101,7 @@ class LockwiseXCUITests: BaseTestCase {

func testSettingsAccountUI() {
loginToEntryListView()

navigator.goto(Screen.AccountSettingsMenu)
waitforExistence(app.navigationBars["accountSetting.navigationBar"])
XCTAssertTrue(app.staticTexts["username.Label"].exists)
Expand Down

0 comments on commit 414bfa6

Please sign in to comment.