Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
firefox-merge-…
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import XCTest
let NoImageButtonIdentifier = "menu-NoImageMode"
let ContextMenuIdentifier = "Context Menu"
class NoImageTests: BaseTestCase {
private func checkShowImages() {
waitforExistence(app.tables.cells[NoImageButtonIdentifier])
XCTAssertTrue(app.tables.cells[NoImageButtonIdentifier].images["enabled"].exists)
}
private func checkHideImages() {
waitforExistence(app.tables.cells[NoImageButtonIdentifier])
XCTAssertTrue(app.tables.cells[NoImageButtonIdentifier].images["disabled"].exists)
}
// Functionality is tested by UITests/NoImageModeTests, here only the UI is updated properly
func testImageOnOff() {
// Go to a webpage, and select no images or hide images, check it's hidden or not
navigator.openNewURL(urlString: "www.google.com")
waitUntilPageLoad()
// Select hide images, and check the UI is updated
navigator.performAction(Action.ToggleNoImageMode)
checkShowImages()
// Select show images, and check the UI is updated
navigator.performAction(Action.ToggleNoImageMode)
checkHideImages()
}
}