Skip to content

Commit

Permalink
Bug 1456188 - XCUITest Fix History Tests (#3852)
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelrios committed Apr 26, 2018
1 parent 7d9bb68 commit 3efea73
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions XCUITests/HistoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class HistoryTests: BaseTestCase {
func testClearHistoryFromSettings() {
// Browse to have an item in history list
navigator.openURL(webpage["url"]!)
waitUntilPageLoad()
navigator.goto(BrowserTabMenu)
navigator.goto(HomePanel_History)
waitforExistence(app.tables.cells["HistoryPanel.recentlyClosedCell"])
XCTAssertTrue(app.tables.cells.staticTexts[webpage["label"]!].exists)
Expand Down Expand Up @@ -165,13 +167,15 @@ class HistoryTests: BaseTestCase {

navigator.performAction(Action.OpenNewTabFromTabTray)
navigator.nowAt(HomePanelsScreen)
navigator.goto(HistoryRecentlyClosed)
navigator.goto(HomePanel_History)
XCTAssertFalse(app.cells.staticTexts["Recently Closed"].isSelected)
waitforNoExistence(app.tables["Recently Closed Tabs List"])

// Now verify that on regular mode the recently closed list is empty too
navigator.toggleOff(userState.isPrivate, withAction: Action.TogglePrivateMode)
navigator.goto(HomePanelsScreen)
navigator.goto(HistoryRecentlyClosed)
navigator.goto(HomePanel_History)
XCTAssertFalse(app.cells.staticTexts["Recently Closed"].isSelected)
waitforNoExistence(app.tables["Recently Closed Tabs List"])
}
}

0 comments on commit 3efea73

Please sign in to comment.