Skip to content

Commit

Permalink
Bugfix MTE-2352 - Focus Full Functional Tests for iOS 16 (#19381)
Browse files Browse the repository at this point in the history
* Skip some tests for iOS 16. Labels for iOS 16.

* empty commit
  • Loading branch information
clarmso authored Mar 26, 2024
1 parent c36c513 commit 29f41d0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ class URLExtensionsTests: XCTestCase {
}

func testValidIPv6Addresses() throws {
guard #available(iOS 17, *) else {
throw XCTSkip("IPv6 address is not supported completely.")
}
try validURLwithIPv6Address.forEach {
let url = try XCTUnwrap(URL(string: $0))
XCTAssertTrue(url.isIPv6, "No IPv& address in URL: '\(url)'")
XCTAssertTrue(url.isIPv6, "No IPv6 address in URL: '\(url)'")
}
}

Expand Down
14 changes: 11 additions & 3 deletions focus-ios/focus-ios-tests/XCUITest/SearchProviderTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ class SearchProviderTest: BaseTestCase {
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2512722
func testAmazonSearchProvider() {
func testAmazonSearchProvider() throws {
guard #available(iOS 17, *) else {
throw XCTSkip("Amazon search not working in iOS 16")
}
searchProviderTestHelper(provider: "Amazon.com")
}

Expand Down Expand Up @@ -103,8 +106,13 @@ class SearchProviderTest: BaseTestCase {

// enter edit mode
app.navigationBars.buttons["edit"].tap()
waitForExistence(app.tables.cells["MDN"].buttons["Remove MDN"])
app.tables.cells["MDN"].buttons["Remove MDN"].tap()
if #available(iOS 17, *) {
waitForExistence(app.tables.cells["MDN"].buttons["Remove MDN"])
app.tables.cells["MDN"].buttons["Remove MDN"].tap()
} else {
waitForExistence(app.tables.cells["MDN"].buttons["Delete MDN"])
app.tables.cells["MDN"].buttons["Delete MDN"].tap()
}
waitForExistence(app.tables.cells["MDN"].buttons["Delete"])
app.tables.cells["MDN"].buttons["Delete"].tap()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,13 @@ class SettingAppearanceTest: BaseTestCase {
// Start Editing
waitForHittable(app.navigationBars.buttons["editButton"])
app.navigationBars.buttons["editButton"].tap()
waitForHittable(app.tables.cells["mozilla.org"].buttons["Remove mozilla.org"])
app.tables.cells["mozilla.org"].buttons["Remove mozilla.org"].tap()
if #available(iOS 17, *) {
waitForHittable(app.tables.cells["mozilla.org"].buttons["Remove mozilla.org"])
app.tables.cells["mozilla.org"].buttons["Remove mozilla.org"].tap()
} else {
waitForHittable(app.tables.cells["mozilla.org"].buttons["Delete mozilla.org"])
app.tables.cells["mozilla.org"].buttons["Delete mozilla.org"].tap()
}
waitForHittable(app.tables.cells["mozilla.org"].buttons["Delete"])
app.tables.cells["mozilla.org"].buttons["Delete"].tap()

Expand Down
6 changes: 5 additions & 1 deletion focus-ios/focus-ios-tests/XCUITest/WebsiteAccessTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ class WebsiteAccessTests: BaseTestCase {
app.tables.cells["SettingsViewController.autocompleteCell"].tap()
app.tables.cells["customURLS"].tap()
app.navigationBars.buttons["editButton"].tap()
app.tables.cells["getfirefox.com"].buttons["Remove getfirefox.com"].tap()
if #available(iOS 17, *) {
app.tables.cells["getfirefox.com"].buttons["Remove getfirefox.com"].tap()
} else {
app.tables.cells["getfirefox.com"].buttons["Delete getfirefox.com"].tap()
}
app.tables.cells["getfirefox.com"].buttons["Delete"].tap()

// Finish Editing
Expand Down

0 comments on commit 29f41d0

Please sign in to comment.