Skip to content

Commit

Permalink
Refactor MTE-1792 [v121] DisplaySettingTests with TestRail
Browse files Browse the repository at this point in the history
  • Loading branch information
dragosb01 committed Oct 24, 2023
1 parent 9acf5ac commit 0417a31
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tests/XCUITests/DisplaySettingsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import XCTest

class DisplaySettingTests: BaseTestCase {
// https://testrail.stage.mozaws.net/index.php?/cases/view/2337485
func testCheckDisplaySettingsDefault() {
navigator.nowAt(NewTabScreen)
navigator.goto(DisplaySettings)
Expand All @@ -14,12 +15,14 @@ class DisplaySettingTests: BaseTestCase {
XCTAssertEqual(switchValue as! String, "1")
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2337487
func testCheckSystemThemeChanges() {
navigator.nowAt(NewTabScreen)
navigator.goto(DisplaySettings)
mozWaitForElementToExist(app.switches["SystemThemeSwitchValue"])
navigator.performAction(Action.SystemThemeSwitch)
mozWaitForElementToExist(app.tables["DisplayTheme.Setting.Options"].otherElements.staticTexts["SWITCH MODE"])
mozWaitForElementToExist(app.tables["DisplayTheme.Setting.Options"].otherElements.staticTexts["THEME PICKER"])

// Going back to Settings and Display settings keeps the value
navigator.goto(SettingsScreen)
Expand Down Expand Up @@ -48,5 +51,7 @@ class DisplaySettingTests: BaseTestCase {
let switchValueAfter = app.switches["SystemThemeSwitchValue"].value!
XCTAssertEqual(switchValueAfter as! String, "1")
XCTAssertFalse(app.tables["DisplayTheme.Setting.Options"].otherElements.staticTexts["SWITCH MODE"].exists)
mozWaitForElementToNotExist(app.tables["DisplayTheme.Setting.Options"].otherElements.staticTexts["SWITCH MODE"])
mozWaitForElementToNotExist(app.tables["DisplayTheme.Setting.Options"].otherElements.staticTexts["THEME PICKER"])
}
}

0 comments on commit 0417a31

Please sign in to comment.