Skip to content

Commit

Permalink
Refactor MTE-1874 [v121] Jump Back and Search Settings tests (mozilla…
Browse files Browse the repository at this point in the history
  • Loading branch information
dragosb01 authored Nov 8, 2023
1 parent 248ad4a commit 5a0d0f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tests/XCUITests/JumpBackInTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class JumpBackInTests: BaseTestCase {
navigator.goto(NewTabScreen)
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2306922
func testJumpBackInSection() {
// Open a tab and visit a page
navigator.openURL("https://www.example.com")
Expand All @@ -46,6 +47,8 @@ class JumpBackInTests: BaseTestCase {
// I don't test for its existence.
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2306920
// Smoketest
func testPrivateTab() throws {
throw XCTSkip("This test is flaky")
// // Visit https://www.twitter.com
Expand Down
5 changes: 5 additions & 0 deletions Tests/XCUITests/SearchSettingsUITest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ let defaultSearchEngine2 = "Amazon.com"
let customSearchEngine = ["name": "youtube", "url": "https://youtube.com/search?q=%s"]

class SearchSettingsUITests: BaseTestCase {
// https://testrail.stage.mozaws.net/index.php?/cases/view/2353246
func testDefaultSearchEngine() {
navigator.nowAt(NewTabScreen)
navigator.goto(SearchSettings)
Expand All @@ -23,6 +24,7 @@ class SearchSettingsUITests: BaseTestCase {
mozWaitForElementToExist(app.tables.cells.staticTexts[defaultSearchEngine2])
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2353247
func testCustomSearchEngineIsEditable() {
navigator.nowAt(NewTabScreen)
navigator.goto(SearchSettings)
Expand Down Expand Up @@ -53,6 +55,7 @@ class SearchSettingsUITests: BaseTestCase {
mozWaitForElementToExist(app.tables.cells.staticTexts[customSearchEngine["name"]!])
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2353248
func testCustomSearchEngineAsDefaultIsNotEditable() {
navigator.nowAt(NewTabScreen)
navigator.goto(SearchSettings)
Expand All @@ -72,6 +75,7 @@ class SearchSettingsUITests: BaseTestCase {
XCTAssertFalse(app.buttons["Edit"].isEnabled)
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2353249
func testNavigateToSearchPickerTurnsOffEditing() {
navigator.nowAt(NewTabScreen)
navigator.goto(SearchSettings)
Expand All @@ -97,6 +101,7 @@ class SearchSettingsUITests: BaseTestCase {
XCTAssertEqual(app.tables.cells.switches.count, app.tables.cells.count - 2)
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2353250
func testDeletingLastCustomEngineExitsEditing() {
navigator.nowAt(NewTabScreen)
navigator.goto(SearchSettings)
Expand Down

0 comments on commit 5a0d0f9

Please sign in to comment.