Skip to content

Commit c032bba

Browse files
committed
Fix setup/teardown warnings in the XCUITests suite.
1 parent 6070a67 commit c032bba

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

firefox-ios/firefox-ios-tests/Tests/XCUITests/DownloadsTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ let testBLOBFileSize = "35 bytes"
1515
class DownloadsTests: BaseTestCase {
1616
var downloadsScreen: DownloadsScreen!
1717
var browserScreen: BrowserScreen!
18-
override func tearDown() {
19-
defer { super.tearDown() }
2018

21-
guard let navigator = navigator else {
22-
print("⚠️ Navigator is nil in tearDown — skipping cleanup.")
23-
return
24-
}
19+
override func tearDown() async throws {
20+
guard let navigator = navigator else {
21+
print("⚠️ Navigator is nil in tearDown — skipping cleanup.")
22+
return
23+
}
24+
2525
// The downloaded file has to be removed between tests
2626
app.terminate()
2727
app.launch()
@@ -37,7 +37,7 @@ class DownloadsTests: BaseTestCase {
3737
app.tables["DownloadsTable"].buttons["Delete"].waitAndTap()
3838
}
3939
}
40-
super.tearDown()
40+
try await super.tearDown()
4141
}
4242

4343
private func deleteItem(itemName: String) {

firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ let websiteWithSearchField = "https://developer.mozilla.org/en-US/"
2424
let tabTrayCollectionView = AccessibilityIdentifiers.TabTray.collectionView
2525

2626
class DragAndDropTests: BaseTestCase {
27-
// Disable test suite since in theory it does not make sense with Chron tabs implementation
28-
override func tearDown() {
27+
// Disable test suite since in theory it does not make sense with Chron tabs implementation
28+
override func tearDown() async throws {
2929
XCUIDevice.shared.orientation = UIDeviceOrientation.portrait
30-
super.tearDown()
30+
try await super.tearDown()
3131
}
3232

3333
// https://mozilla.testrail.io/index.php?/cases/view/2362645

firefox-ios/firefox-ios-tests/Tests/XCUITests/HomeButtonTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import XCTest
66

77
class HomeButtonTests: BaseTestCase {
8-
override func tearDown() {
8+
override func tearDown() async throws {
99
XCUIDevice.shared.orientation = .portrait
10-
super.tearDown()
10+
try await super.tearDown()
1111
}
1212

1313
// https://mozilla.testrail.io/index.php?/cases/view/2306925

firefox-ios/firefox-ios-tests/Tests/XCUITests/SettingsTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import XCTest
77
class SettingsTests: FeatureFlaggedTestBase {
88
var settingsScreen: SettingScreen!
99

10-
override func tearDown() {
10+
override func tearDown() async throws {
1111
if name.contains("testAutofillPasswordSettingsOptionSubtitles") ||
1212
name.contains("testBrowsingSettingsOptionSubtitles") ||
1313
name.contains("testSettingsOptionSubtitlesDarkMode") ||
1414
name.contains("testSettingsOptionSubtitlesDarkModeLandscape") {
1515
switchThemeToDarkOrLight(theme: "Light")
1616
}
1717
XCUIDevice.shared.orientation = .portrait
18-
super.tearDown()
18+
try await super.tearDown()
1919
}
2020

2121
private func checkShowImages(showImages: Bool = true) {

firefox-ios/firefox-ios-tests/Tests/XCUITests/SwipingTabsTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import Foundation
66
import XCTest
77

88
class SwipingTabsTests: BaseTestCase {
9-
override func tearDown() {
9+
override func tearDown() async throws {
1010
XCUIDevice.shared.orientation = .portrait
11-
super.tearDown()
11+
try await super.tearDown()
1212
}
1313

1414
let addressBar = XCUIApplication().textFields[AccessibilityIdentifiers.Browser.AddressToolbar.searchTextField]

firefox-ios/firefox-ios-tests/Tests/XCUITests/ToolbarMenuTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import Foundation
66
import XCTest
77

88
class ToolbarMenuTests: BaseTestCase {
9-
override func tearDown() {
9+
override func tearDown() async throws {
1010
XCUIDevice.shared.orientation = .portrait
11-
super.tearDown()
11+
try await super.tearDown()
1212
}
1313

1414
// https://mozilla.testrail.io/index.php?/cases/view/2306840

0 commit comments

Comments
 (0)