From 3efea7317db273702b3755262eb282ac3b3643f3 Mon Sep 17 00:00:00 2001 From: isabelrios Date: Tue, 24 Apr 2018 13:20:23 +0200 Subject: [PATCH] Bug 1456188 - XCUITest Fix History Tests (#3852) --- XCUITests/HistoryTests.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/XCUITests/HistoryTests.swift b/XCUITests/HistoryTests.swift index fd401909247a..9dd836cde6c4 100644 --- a/XCUITests/HistoryTests.swift +++ b/XCUITests/HistoryTests.swift @@ -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) @@ -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"]) } }