-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor FXIOS-12796 [Swift 6 Migration] Fix main actor isolation warnings that are Swift 6 errors in the XCUITests suite - Batch 2 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: coderabbit_full_base__refactor_fxios-12796_swift_6_migration_fix_main_actor_isolation_warnings_that_are_swift_6_errors_in_the_xcuitests_suite_-_batch_2_pr2
Are you sure you want to change the base?
Refactor FXIOS-12796 [Swift 6 Migration] Fix main actor isolation warnings that are Swift 6 errors in the XCUITests suite - Batch 2 #28
Conversation
WalkthroughThis pull request systematically updates the Firefox iOS test suite for Swift concurrency compliance. It converts test lifecycle methods (setUp/tearDown) across 30+ test files from synchronous to asynchronous throwing variants, and adds Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
firefox-ios/firefox-ios-tests/Tests/XCUITests/DatabaseFixtureTest.swift (1)
15-22: Guard against unexpected test names and missing fixtures.
parts[1]andfixtures[key]!can crash if the test name format changes or a fixture key is missing. SincesetUp()now throws, fail gracefully instead of force-unwrapping.🔧 Suggested fix
- let parts = name.replacingOccurrences(of: "]", with: "").split(separator: " ") - let key = String(parts[1]) + let parts = name.replacingOccurrences(of: "]", with: "").split(separator: " ") + guard parts.count > 1 else { + throw XCTSkip("Unexpected test name format: \(name)") + } + let key = String(parts[1]) + guard let fixture = fixtures[key] else { + throw XCTSkip("Missing fixture for test: \(key)") + } launchArguments = [LaunchArguments.SkipIntro, LaunchArguments.SkipWhatsNew, LaunchArguments.SkipETPCoverSheet, - LaunchArguments.LoadDatabasePrefix + fixtures[key]!, + LaunchArguments.LoadDatabasePrefix + fixture, LaunchArguments.SkipContextualHints, LaunchArguments.DisableAnimations]firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (1)
139-142: MakeforceRestartApp()async and await the overridden methods.The custom
setUp() async throwsandtearDown() async throwsoverrides (which contain critical setup/teardown logic likesetUpApp(),setUpScreenGraph(), andapp.terminate()) are being skipped. SinceforceRestartApp()is sync and calls these methods withoutawait, it invokes the parent XCTestCase sync overloads instead. UpdateforceRestartApp()toasync throwsandawaitboth calls, then update the call sites in AuthenticationTest.swift (line 52) and BookmarksTests.swift (line 401) to handle the async method.Suggested fix
- func forceRestartApp() { - tearDown() - setUp() - } + func forceRestartApp() async throws { + try await tearDown() + try await setUp() + }
🤖 Fix all issues with AI agents
In `@firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift`:
- Around line 508-512: The overridden async test setup calls super.setUp()
without the required try; update the call in override func setUp() async throws
so the throwing async call uses try await (i.e., replace await super.setUp()
with try await super.setUp()) to properly propagate errors from the superclass
setup.
In `@firefox-ios/firefox-ios-tests/Tests/XCUITests/FeatureFlaggedTestBase.swift`:
- Around line 46-50: The setup ordering is incorrect: move the call to
setUpExperimentVariables() to run before setUpApp() and setUpLaunchArguments()
inside override func setUp() so the implicitly unwrapped optionals jsonFileName
and featureName are initialized prior to being used by setUpApp() (and before
building launch arguments in setUpLaunchArguments()); update the sequence in
setUp() to call setUpExperimentVariables() first, then setUpApp(), then
setUpLaunchArguments() to prevent crashes or missing arguments.
- Around line 46-52: The override of setUp() in FeatureFlaggedTestBase
duplicates parent initialization; change it to call try await super.setUp() at
the top of FeatureFlaggedTestBase.setUp(), keep continueAfterFailure = false if
needed, then only perform test-specific setup like setUpExperimentVariables()
and setUpScreenGraph(); remove the direct calls to setUpApp() and
setUpLaunchArguments() here since the base class (and FeatureFlaggedTestBase's
setUpApp override) should manage app launch timing and launch args.
🧹 Nitpick comments (1)
firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
10-15: Remove duplicate setup calls after super.setUp().
BaseTestCase already runssetUpApp()andsetUpScreenGraph(), so calling them again here is redundant and can cause extra app launches or graph rebuilds.♻️ Proposed cleanup
override func setUp() async throws { try await super.setUp() - continueAfterFailure = false - setUpApp() // prepares launch arguments - setUpScreenGraph() // builds the MappaMundi navigator zoomBar = ZoomBarScreen(app: app) }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (51)
firefox-ios/firefox-ios-tests/Tests/XCUITests/A11yOnboardingTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/A11yUtils.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/BookmarksTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/BrowsingPDFTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/C_AddressesTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/DatabaseFixtureTest.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/DisplaySettingsTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/DomainAutocompleteTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/EngagementNotificationTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/FeatureFlaggedTestBase.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/FxScreenGraph.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/HomePageSettingsUITest.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/InactiveTabsTest.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/LoginsTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/MicrosurveyTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/MultiWindowTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/NavigationRegistry.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/PerformanceTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/PhotonActionSheetTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/ReadingListTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/ScreenGraphTest.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/TabsTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/TodayWidgetTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/ToolbarTest.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/URLValidationTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerCommonNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerContextMenuNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerFxAccountNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerHomePanelNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerLibraryPanelNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerMiscellanousActions.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerMiscellanousNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerMobileNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerOnboardingNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerSettingsNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerTabMenuNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerTabTrayNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerToolbarNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerTrackingProtection.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerUrlBarNavigation.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/registerZoomNavigation.swift
🧰 Additional context used
🧬 Code graph analysis (16)
firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (11)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (4)
setUp(112-117)setUp(508-513)setUp(517-522)iPad(357-362)firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift (1)
setUp(31-51)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (1)
setUp(294-308)firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
setUp(46-65)firefox-ios/firefox-ios-tests/Tests/XCUITests/HomePageSettingsUITest.swift (1)
setUp(25-39)firefox-ios/firefox-ios-tests/Tests/XCUITests/InactiveTabsTest.swift (1)
setUp(9-29)firefox-ios/firefox-ios-tests/Tests/XCUITests/PhotonActionSheetTests.swift (1)
setUp(14-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
setUp(301-306)firefox-ios/firefox-ios-tests/Tests/XCUITests/ReadingListTests.swift (1)
setUp(13-18)firefox-ios/firefox-ios-tests/Tests/XCUITests/TabsTests.swift (1)
setUp(635-644)firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
setUp(10-16)
firefox-ios/firefox-ios-tests/Tests/XCUITests/InactiveTabsTest.swift (15)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (2)
setUp(112-117)setUp(508-513)firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift (1)
setUp(31-51)firefox-ios/firefox-ios-tests/Tests/XCUITests/BookmarksTests.swift (1)
setUp(21-29)firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (1)
setUp(96-104)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (1)
setUp(294-308)firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
setUp(46-65)firefox-ios/firefox-ios-tests/Tests/XCUITests/HomePageSettingsUITest.swift (1)
setUp(25-39)firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift (1)
setUp(23-44)firefox-ios/firefox-ios-tests/Tests/XCUITests/LoginsTests.swift (1)
setUp(36-52)firefox-ios/firefox-ios-tests/Tests/XCUITests/MicrosurveyTests.swift (1)
setUp(9-16)firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
setUp(301-306)firefox-ios/firefox-ios-tests/Tests/XCUITests/ReadingListTests.swift (1)
setUp(13-18)firefox-ios/firefox-ios-tests/Tests/XCUITests/TabsTests.swift (1)
setUp(635-644)firefox-ios/firefox-ios-tests/Tests/XCUITests/ToolbarTest.swift (1)
setUp(16-19)firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
setUp(10-16)
firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift (6)
firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift (1)
setUp(31-51)firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (1)
setUp(96-104)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (1)
setUp(294-308)firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
setUp(46-65)firefox-ios/firefox-ios-tests/Tests/XCUITests/LoginsTests.swift (1)
setUp(36-52)firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
setUp(301-306)
firefox-ios/firefox-ios-tests/Tests/XCUITests/ToolbarTest.swift (8)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (4)
setUp(112-117)setUp(508-513)setUp(517-522)tearDown(119-122)firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
setUp(301-306)firefox-ios/firefox-ios-tests/Tests/XCUITests/ReadingListTests.swift (1)
setUp(13-18)firefox-ios/firefox-ios-tests/Tests/XCUITests/TabsTests.swift (1)
setUp(635-644)firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (2)
setUp(10-16)tearDown(18-21)firefox-ios/firefox-ios-tests/Tests/XCUITests/A11yOnboardingTests.swift (1)
tearDown(22-25)firefox-ios/firefox-ios-tests/Tests/XCUITests/C_AddressesTests.swift (1)
tearDown(38-45)firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift (1)
tearDown(27-33)
firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (4)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (6)
setUp(112-117)setUp(508-513)setUp(517-522)setUpApp(95-102)setUpScreenGraph(87-90)tearDown(119-122)firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
setUp(301-306)firefox-ios/firefox-ios-tests/Tests/XCUITests/ToolbarTest.swift (2)
setUp(16-19)tearDown(21-24)firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift (1)
tearDown(27-33)
firefox-ios/firefox-ios-tests/Tests/XCUITests/PerformanceTests.swift (4)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (3)
setUp(112-117)setUp(508-513)setUp(517-522)firefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swift (1)
setUp(11-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/DatabaseFixtureTest.swift (1)
setUp(14-25)firefox-ios/firefox-ios-tests/Tests/XCUITests/DisplaySettingsTests.swift (1)
setUp(8-18)
firefox-ios/firefox-ios-tests/Tests/XCUITests/DomainAutocompleteTests.swift (13)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (3)
setUp(112-117)setUp(508-513)setUp(517-522)firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift (1)
setUp(31-51)firefox-ios/firefox-ios-tests/Tests/XCUITests/BookmarksTests.swift (1)
setUp(21-29)firefox-ios/firefox-ios-tests/Tests/XCUITests/BrowsingPDFTests.swift (1)
setUp(24-32)firefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swift (1)
setUp(11-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (1)
setUp(96-104)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (1)
setUp(294-308)firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
setUp(46-65)firefox-ios/firefox-ios-tests/Tests/XCUITests/HomePageSettingsUITest.swift (1)
setUp(25-39)firefox-ios/firefox-ios-tests/Tests/XCUITests/PhotonActionSheetTests.swift (1)
setUp(14-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
setUp(301-306)firefox-ios/firefox-ios-tests/Tests/XCUITests/ReadingListTests.swift (1)
setUp(13-18)firefox-ios/firefox-ios-tests/Tests/XCUITests/TabsTests.swift (1)
setUp(635-644)
firefox-ios/firefox-ios-tests/Tests/XCUITests/FeatureFlaggedTestBase.swift (12)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (4)
setUp(112-117)setUp(508-513)setUp(517-522)setUpApp(95-102)firefox-ios/firefox-ios-tests/Tests/XCUITests/ScreenGraphTest.swift (1)
setUp(34-47)firefox-ios/firefox-ios-tests/Tests/XCUITests/A11yOnboardingTests.swift (1)
setUp(14-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/BookmarksTests.swift (1)
setUp(21-29)firefox-ios/firefox-ios-tests/Tests/XCUITests/BrowsingPDFTests.swift (1)
setUp(24-32)firefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swift (1)
setUp(11-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/DatabaseFixtureTest.swift (1)
setUp(14-25)firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (1)
setUp(96-104)firefox-ios/firefox-ios-tests/Tests/XCUITests/DisplaySettingsTests.swift (1)
setUp(8-18)firefox-ios/firefox-ios-tests/Tests/XCUITests/DomainAutocompleteTests.swift (1)
setUp(31-45)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (1)
setUp(294-308)firefox-ios/firefox-ios-tests/Tests/XCUITests/EngagementNotificationTests.swift (1)
setUp(8-16)
firefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swift (14)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (4)
setUp(112-117)setUp(508-513)setUp(517-522)removeApp(72-85)firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift (1)
setUp(31-51)firefox-ios/firefox-ios-tests/Tests/XCUITests/BookmarksTests.swift (1)
setUp(21-29)firefox-ios/firefox-ios-tests/Tests/XCUITests/BrowsingPDFTests.swift (1)
setUp(24-32)firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (1)
setUp(96-104)firefox-ios/firefox-ios-tests/Tests/XCUITests/DomainAutocompleteTests.swift (1)
setUp(31-45)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (1)
setUp(294-308)firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
setUp(46-65)firefox-ios/firefox-ios-tests/Tests/XCUITests/HomePageSettingsUITest.swift (1)
setUp(25-39)firefox-ios/firefox-ios-tests/Tests/XCUITests/LoginsTests.swift (1)
setUp(36-52)firefox-ios/firefox-ios-tests/Tests/XCUITests/MultiWindowTests.swift (1)
setUp(13-19)firefox-ios/firefox-ios-tests/Tests/XCUITests/PhotonActionSheetTests.swift (1)
setUp(14-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
setUp(301-306)firefox-ios/firefox-ios-tests/Tests/XCUITests/ToolbarTest.swift (1)
setUp(16-19)
firefox-ios/firefox-ios-tests/Tests/XCUITests/MicrosurveyTests.swift (5)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (3)
setUp(112-117)setUp(508-513)setUp(517-522)firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (1)
setUp(96-104)firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
setUp(46-65)firefox-ios/firefox-ios-tests/Tests/XCUITests/InactiveTabsTest.swift (1)
setUp(9-29)firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
setUp(10-16)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BookmarksTests.swift (4)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (4)
setUp(112-117)setUp(508-513)setUp(517-522)tearDown(119-122)firefox-ios/firefox-ios-tests/Tests/XCUITests/C_AddressesTests.swift (2)
setUp(16-36)tearDown(38-45)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (3)
setUp(294-308)tearDown(28-31)tearDown(310-313)firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
tearDown(18-21)
firefox-ios/firefox-ios-tests/Tests/XCUITests/ReadingListTests.swift (14)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (3)
setUp(112-117)setUp(508-513)setUp(517-522)firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift (1)
setUp(31-51)firefox-ios/firefox-ios-tests/Tests/XCUITests/BookmarksTests.swift (1)
setUp(21-29)firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (1)
setUp(96-104)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (1)
setUp(294-308)firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
setUp(46-65)firefox-ios/firefox-ios-tests/Tests/XCUITests/HomePageSettingsUITest.swift (1)
setUp(25-39)firefox-ios/firefox-ios-tests/Tests/XCUITests/LoginsTests.swift (1)
setUp(36-52)firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift (1)
setUp(16-25)firefox-ios/firefox-ios-tests/Tests/XCUITests/PhotonActionSheetTests.swift (1)
setUp(14-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
setUp(301-306)firefox-ios/firefox-ios-tests/Tests/XCUITests/TabsTests.swift (1)
setUp(635-644)firefox-ios/firefox-ios-tests/Tests/XCUITests/ToolbarTest.swift (1)
setUp(16-19)firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
setUp(10-16)
firefox-ios/firefox-ios-tests/Tests/XCUITests/DatabaseFixtureTest.swift (5)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (3)
setUp(112-117)setUp(508-513)setUp(517-522)firefox-ios/firefox-ios-tests/Tests/XCUITests/ScreenGraphTest.swift (1)
setUp(34-47)firefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swift (1)
setUp(11-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/DisplaySettingsTests.swift (1)
setUp(8-18)firefox-ios/firefox-ios-tests/Tests/XCUITests/EngagementNotificationTests.swift (1)
setUp(8-16)
firefox-ios/firefox-ios-tests/Tests/XCUITests/ScreenGraphTest.swift (9)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (3)
setUp(112-117)setUp(508-513)setUp(517-522)firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift (1)
setUp(31-51)firefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swift (1)
setUp(11-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/DomainAutocompleteTests.swift (1)
setUp(31-45)firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (1)
setUp(294-308)firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
setUp(46-65)firefox-ios/firefox-ios-tests/Tests/XCUITests/HomePageSettingsUITest.swift (1)
setUp(25-39)firefox-ios/firefox-ios-tests/Tests/XCUITests/PhotonActionSheetTests.swift (1)
setUp(14-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
setUp(10-16)
firefox-ios/firefox-ios-tests/Tests/XCUITests/FxScreenGraph.swift (1)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (2)
waitAndTap(626-629)tap(532-541)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BrowsingPDFTests.swift (4)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (3)
setUp(112-117)setUp(508-513)setUp(517-522)firefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swift (1)
setUp(11-20)firefox-ios/firefox-ios-tests/Tests/XCUITests/ReadingListTests.swift (1)
setUp(13-18)firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
setUp(10-16)
🔇 Additional comments (64)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BrowsingPDFTests.swift (1)
24-26: Async setUp conversion looks correct.Matches the async lifecycle pattern and properly awaits
super.setUp().firefox-ios/firefox-ios-tests/Tests/XCUITests/InactiveTabsTest.swift (1)
9-21: LGTM: asyncsetUpalignment.
Matches the async/throws lifecycle pattern used elsewhere, andtry await super.setUp()is correctly chained.firefox-ios/firefox-ios-tests/Tests/XCUITests/LoginsTests.swift (1)
36-52: LGTM!The Swift 6 migration changes are correctly applied:
setUp()is properly converted toasync throwsvariant- The
super.setUp()call correctly usestry await- The conditional
removeApp()logic beforesuper.setUp()is appropriately placed to ensure fresh install before the parent class initializes the appfirefox-ios/firefox-ios-tests/Tests/XCUITests/CookiePersistenceTests.swift (1)
11-20: LGTM!The conversion to
async throwssetUp withtry await super.setUp()is correct and consistent with the Swift 6 migration pattern applied across other test files in the suite (e.g.,LoginsTests.swift,BookmarksTests.swift,HistoryTests.swift). The conditionalremoveApp()logic is appropriately placed before the super call.firefox-ios/firefox-ios-tests/Tests/XCUITests/A11yUtils.swift (1)
3-4: LGTM! Appropriate@MainActorannotation for Swift 6 concurrency.Adding
@MainActortoA11yUtilsis the correct approach since the class methods interact withXCUIElementand XCTest APIs (XCTContext.runActivity,XCTAttachment) that require main actor isolation in Swift 6.firefox-ios/firefox-ios-tests/Tests/XCUITests/TabsTests.swift (1)
635-639: LGTM: async/throws setUp migration is consistent.
The async super call is properly awaited and scoped to the non‑iPad path.firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift (2)
294-307: Async setUp update looks correct.The async/throwing signature and
try await super.setUp()call align with Swift 6 concurrency expectations.
310-312: Async tearDown update looks correct.
try await super.tearDown()is the right adjustment for the async lifecycle method.firefox-ios/firefox-ios-tests/Tests/XCUITests/PrivateBrowsingTest.swift (1)
300-306: LGTM! Correct Swift 6 async/await migration for setUp.The conversion to
async throwsand usingtry await super.setUp()is the correct pattern for Swift 6 concurrency compliance in XCTest.One observation on pre-existing logic: the conditional
if !iPad()meanssuper.setUp()is skipped on iPad devices. This appears intentional given the class name andspecificForPlatform = .phone, but if this class is ever inadvertently run on iPad, base class initialization won't occur. The existingif skipPlatform { return }guards in test methods provide a safety net for this.firefox-ios/firefox-ios-tests/Tests/XCUITests/C_AddressesTests.swift (2)
16-18: LGTM!The conversion of
setUp()toasync throwswithtry await super.setUp()correctly aligns with Swift 6 concurrency requirements. The super call is appropriately placed at the beginning of the method.
38-45: LGTM!The conversion of
tearDown()toasync throwswithtry await super.tearDown()is correct. The super call is appropriately placed at the end, ensuring subclass cleanup (theme switch, orientation reset, app termination) completes before the base class teardown.firefox-ios/firefox-ios-tests/Tests/XCUITests/TodayWidgetTests.swift (6)
15-22: LGTM! Appropriate@MainActorannotations for Swift 6 compliance.The
@MainActorannotations correctly isolate these mutable global variables that accessspringboard.buttons, ensuring thread-safe access in Swift 6 strict concurrency mode. The existing TODO comment (line 14) appropriately tracks the technical debt of using global mutable state.
25-41: LGTM! Coordinate and screen size constants properly isolated.The
@MainActorannotations correctly handle the dependency chain (screenSize→centerRightX/centerRightY→coordinate). Swift's lazy initialization of global constants ensures these are evaluated in the correct order on the main actor when first accessed.
49-58: LGTM!The
@MainActorannotation is appropriate since the function accessesspringboard.buttonswhich requires main actor isolation.
60-72: LGTM!The
@MainActorannotation correctly isolates this function that interacts withspringboardUI elements (textFields, icons, swipeRight).
74-96: LGTM!The
@MainActorannotation is correct since this function callswidgetExist()(now@MainActor) and accessesspringboard.buttons.
98-122: LGTM!The
@MainActorannotation is appropriate for this function that accessesspringboard.buttonsandspringboard.swipeUp().firefox-ios/firefox-ios-tests/Tests/XCUITests/URLValidationTests.swift (1)
14-15: LGTM!The conversion to
async throwssetUp withtry await super.setUp()correctly aligns with the Swift 6 migration pattern established inBaseTestCaseand other test files in this PR.firefox-ios/firefox-ios-tests/Tests/XCUITests/MicrosurveyTests.swift (1)
9-16: LGTM!The async throws conversion maintains the correct operation order: setting
launchArgumentsbeforesuper.setUp(), then launching the app. This matches the pattern used in other test files likeInactiveTabsTest.swift.firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift (1)
96-104: LGTM!The conditional
setUppattern for phone-only tests is correctly implemented, matching the established pattern inPrivateBrowsingTest.swiftandTabsTests.swift. Screen objects are appropriately initialized after the conditional super call.firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift (1)
23-44: LGTM!The async throws conversion correctly follows the established pattern for test-specific database fixtures. The order of operations is preserved: parse test name → conditionally set
launchArguments→ append common arguments → callsuper.setUp().firefox-ios/firefox-ios-tests/Tests/XCUITests/PerformanceTests.swift (1)
24-43: LGTM!The async throws conversion maintains the correct setup flow for performance tests: initialize default launch arguments, conditionally append test-specific fixtures, then call
super.setUp(). This aligns with the pattern inDatabaseFixtureTest.swift.firefox-ios/firefox-ios-tests/Tests/XCUITests/ScreenGraphTest.swift (2)
10-11: LGTM!The
@MainActorannotation is appropriate for this test class since it directly interacts withXCUIApplicationand UI elements. This ensures Swift 6 concurrency compliance for main-thread UI operations.
34-35: LGTM!The async throws setUp conversion is correctly implemented and follows the same pattern applied across the test suite in this PR.
firefox-ios/firefox-ios-tests/Tests/XCUITests/ReadingListTests.swift (1)
13-14: Async setUp migration looks correct.
try await super.setUp()ensures base setup completes before screen initialization. Please confirm the test target’s minimum Xcode/Swift toolchain supports async/throws XCTest lifecycle methods.firefox-ios/firefox-ios-tests/Tests/XCUITests/HomePageSettingsUITest.swift (1)
25-38: Async setUp update is consistent with the suite.
Keeping launch-argument setup beforetry await super.setUp()preserves the existing flow. Please confirm async XCTest lifecycle methods are supported by the minimum toolchain used in CI.firefox-ios/firefox-ios-tests/Tests/XCUITests/MultiWindowTests.swift (2)
13-18: setUp async/throws migration looks good.
try await super.setUp()before per-test setup aligns with Swift 6 XCTest expectations. Please confirm CI’s toolchain supports async setUp/tearDown for UI tests.
21-25: tearDown async/throws migration looks good.
Cleaning up the split view beforetry await super.tearDown()preserves cleanup ordering. Please confirm async XCTest lifecycle methods are supported by the minimum toolchain used.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerTabTrayNavigation.swift (1)
9-10: Main-actor isolation here is appropriate.
This keeps UI navigation registration on the main thread, which matches XCTest UI constraints. Please confirm the Swift concurrency model/version for this target supports the@MainActorannotation.firefox-ios/firefox-ios-tests/Tests/XCUITests/NavigationRegistry.swift (1)
9-10: Main-actor annotation on the registry entry point is consistent.
Constraining registration to the main actor aligns with UI-test threading requirements. Please confirm the Swift toolchain used in CI supports@MainActoron static methods.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerMiscellanousActions.swift (1)
8-9: Main-actor isolation is a good fit here.
Keeping action registration on the main thread aligns with XCTest UI constraints. Please confirm the Swift concurrency model/version for this test target supports@MainActor.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerZoomNavigation.swift (1)
8-9: Main-actor isolation for UI registration looks correct.
Good alignment with Swift 6 UI test requirements.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerContextMenuNavigation.swift (1)
8-9: Main-actor isolation for context menu navigation is appropriate.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerOnboardingNavigation.swift (1)
8-9: @mainactor on onboarding navigation registration is a good fit.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerToolbarNavigation.swift (1)
8-55: Consistent main-actor isolation for toolbar helpers and registration is solid.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerHomePanelNavigation.swift (1)
8-9: Main-actor isolation for home panel navigation looks good.firefox-ios/firefox-ios-tests/Tests/XCUITests/DisplaySettingsTests.swift (1)
8-17: Async/throws lifecycle update is correctly applied.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerMobileNavigation.swift (1)
8-9: LGTM!Adding
@MainActorto this navigation registration function is the correct approach for Swift 6 compliance. The function interacts withXCUIApplicationand registers UI gestures, which should execute on the main thread.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerTabMenuNavigation.swift (1)
8-9: LGTM!The
@MainActorannotation correctly ensures main-thread execution for this navigation registration function that configures UI test states.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerFxAccountNavigation.swift (1)
8-9: LGTM!The
@MainActorannotation is correctly applied to ensure Firefox Account navigation registration runs on the main thread, consistent with the broader Swift 6 migration across the test suite.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerCommonNavigation.swift (1)
8-9: LGTM!The
@MainActorannotation appropriately constrains this common navigation registration function to the main actor for Swift 6 compliance.firefox-ios/firefox-ios-tests/Tests/XCUITests/PhotonActionSheetTests.swift (1)
14-20: LGTM!The async/throws lifecycle migration is correctly implemented. The
try await super.setUp()ensures proper async initialization and error propagation from the base class before initializing screen objects.firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift (2)
30-51: LGTM!The
setUp()method is correctly migrated to async/throws. The launch arguments configuration beforetry await super.setUp()is appropriate, and screen object initialization after the parent setup is correct.
52-56: LGTM!The
tearDown()method is correctly migrated to async/throws. Setting device orientation beforetry await super.tearDown()ensures cleanup happens in the correct order.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerMiscellanousNavigation.swift (1)
8-9: LGTM — main-actor isolation fits UI navigation helpers.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerLibraryPanelNavigation.swift (1)
8-9: LGTM — appropriate main-actor annotation for UI navigation registration.firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift (1)
46-60: LGTM — async setUp with try await super is correctly wired.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerTrackingProtection.swift (1)
8-9: LGTM — main-actor isolation is appropriate here.firefox-ios/firefox-ios-tests/Tests/XCUITests/BookmarksTests.swift (2)
21-22: LGTM — async setUp with try await super aligns with XCTest async lifecycle.
31-33: LGTM — async tearDown with try await super is consistent.firefox-ios/firefox-ios-tests/Tests/XCUITests/ZoomingTests.swift (1)
18-20: LGTM — async tearDown with try await super is consistent.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerUrlBarNavigation.swift (1)
10-11: LGTM!The
@MainActorannotation is appropriate for this UI test helper function that interacts withXCUIApplicationandUIPasteboard.general, ensuring thread-safe UI operations consistent with Swift 6 concurrency requirements.firefox-ios/firefox-ios-tests/Tests/XCUITests/A11yOnboardingTests.swift (1)
14-25: LGTM!The
setUpandtearDownmethods are correctly converted toasync throwsvariants with propertry awaitcalls to the superclass methods, consistent with theBaseTestCasecontract and other test files in this migration.firefox-ios/firefox-ios-tests/Tests/XCUITests/registerSettingsNavigation.swift (1)
8-9: LGTM!The
@MainActorannotation is correctly applied to this UI test navigation helper that performs extensive UI interactions with tables, cells, switches, andUIPasteboard. This aligns with the Swift 6 migration pattern applied to otherregister*functions in this PR.firefox-ios/firefox-ios-tests/Tests/XCUITests/EngagementNotificationTests.swift (1)
8-16: LGTM!The
setUpmethod is correctly converted toasync throwswith propertry await super.setUp()invocation. The pattern matchesCookiePersistenceTests.swiftwhich handles the same iOS 17removeApp()workaround.firefox-ios/firefox-ios-tests/Tests/XCUITests/DomainAutocompleteTests.swift (1)
31-45: LGTM!The
setUpmethod is correctly converted toasync throwswith propertry await super.setUp()invocation after the conditionallaunchArgumentsconfiguration. This pattern is consistent with similar test files likeHistoryTests.swiftandActivityStreamTest.swift.firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift (1)
16-33: LGTM!The
setUpandtearDownmethods are correctly converted toasync throwsvariants. The initialization order is correct:launchArgumentsare set beforesuper.setUp(), screen objects are initialized after (whenappis available), and tearDown performs cleanup before callingsuper.tearDown().firefox-ios/firefox-ios-tests/Tests/XCUITests/ToolbarTest.swift (1)
16-24: Lifecycle async migration looks good.
No concerns with the async/throws overrides and super calls.firefox-ios/firefox-ios-tests/Tests/XCUITests/FxScreenGraph.swift (3)
10-25: Main-actor isolation on screen graph creation looks good.
132-163: Helper actions’ main-actor annotations look good.
127-130: No action required. Verification confirms these are the only module-level declarations ofspringboardandiOS_Settingsin the test target. All other occurrences are function-scoped or class-scoped, which do not cause symbol collisions with module-level names.firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (3)
13-16: Main‑actor UI element globals look good.
112-122: Async setUp/tearDown override looks good.
517-521: iPhone‑only async setup looks good.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| override func setUp() async throws { | ||
| specificForPlatform = .pad | ||
| if iPad() { | ||
| super.setUp() | ||
| await super.setUp() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# First, find and read the specific file
find . -name "BaseTestCase.swift" -path "*XCUITests*" | head -5Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 156
🏁 Script executed:
# Check file size first
wc -l firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift 2>/dev/null || find . -name "BaseTestCase.swift" -type f | xargs wc -lRepository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 158
🏁 Script executed:
# Read the relevant section around lines 508-512
sed -n '500,520p' firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift 2>/dev/null || find . -name "BaseTestCase.swift" -type f -exec sed -n '500,520p' {} \;Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 639
🏁 Script executed:
# Search for the setUp method definition and its class hierarchy
rg -A 5 "override func setUp\(\) async throws" firefox-ios/firefox-ios-tests/Tests/XCUITests/ 2>/dev/null || rg -A 5 "func setUp.*async.*throws"Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 22447
🏁 Script executed:
# Check the parent class to verify setUp() signature
rg -B 5 "class BaseTestCase" firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift 2>/dev/null || rg "class BaseTestCase"Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 219
Add missing try keyword on throwing async super call.
super.setUp() is async throws; the call requires try.
Suggested fix
- if iPad() {
- await super.setUp()
- }
+ if iPad() {
+ try await super.setUp()
+ }🤖 Prompt for AI Agents
In `@firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift` around
lines 508 - 512, The overridden async test setup calls super.setUp() without the
required try; update the call in override func setUp() async throws so the
throwing async call uses try await (i.e., replace await super.setUp() with try
await super.setUp()) to properly propagate errors from the superclass setup.
| override func setUp() async throws { | ||
| continueAfterFailure = false | ||
| setUpExperimentVariables() | ||
| setUpApp() | ||
| setUpExperimentVariables() | ||
| setUpLaunchArguments() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialize experiment variables before building launch arguments.
setUpApp() uses jsonFileName/featureName (Line 42–44), but setUpExperimentVariables() now runs after it (Line 49). Since those are IUOs meant to be set in setUpExperimentVariables(), this can crash or miss arguments.
💡 Suggested fix (restore safe ordering)
override func setUp() async throws {
continueAfterFailure = false
- setUpApp()
- setUpExperimentVariables()
+ setUpExperimentVariables()
+ setUpApp()
setUpLaunchArguments()
setUpScreenGraph()
}🤖 Prompt for AI Agents
In `@firefox-ios/firefox-ios-tests/Tests/XCUITests/FeatureFlaggedTestBase.swift`
around lines 46 - 50, The setup ordering is incorrect: move the call to
setUpExperimentVariables() to run before setUpApp() and setUpLaunchArguments()
inside override func setUp() so the implicitly unwrapped optionals jsonFileName
and featureName are initialized prior to being used by setUpApp() (and before
building launch arguments in setUpLaunchArguments()); update the sequence in
setUp() to call setUpExperimentVariables() first, then setUpApp(), then
setUpLaunchArguments() to prevent crashes or missing arguments.
| override func setUp() async throws { | ||
| continueAfterFailure = false | ||
| setUpExperimentVariables() | ||
| setUpApp() | ||
| setUpExperimentVariables() | ||
| setUpLaunchArguments() | ||
| setUpScreenGraph() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
find . -name "*.swift" | head -20Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 1292
🏁 Script executed:
git ls-files | grep -i test | grep -i swift | head -20Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 1296
🏁 Script executed:
cat -n firefox-ios/firefox-ios-tests/Tests/XCUITests/FeatureFlaggedTestBase.swift | head -80Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 2901
🏁 Script executed:
# Find the parent class of FeatureFlaggedTestBase
rg "class FeatureFlaggedTestBase" -A 2Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 472
🏁 Script executed:
# Search for BaseTestCase definition
rg "class BaseTestCase" -A 20Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 6392
🏁 Script executed:
cat -n firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift | head -150Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 7051
🏁 Script executed:
# Check how XCTestCase.setUp is typically used
rg "override func setUp" firefox-ios/firefox-ios-tests/Tests/XCUITests/ -A 5 | head -100Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 9898
🏁 Script executed:
# Look for other test classes that extend BaseTestCase
rg "class.*: BaseTestCase" firefox-ios/firefox-ios-tests/Tests/XCUITests/Repository: qodo-benchmark/firefox-ios-combined-coderabbit
Length of output: 6767
Refactor to call try await super.setUp() rather than duplicating parent setup logic.
FeatureFlaggedTestSuite.setUp() bypasses the entire parent initialization chain, inconsistent with BaseTestCase and the broader test codebase. While the intentional delay of app.launch() (via FeatureFlaggedTestBase's setUpApp override) is valid, this should not require skipping XCTestCase.setUp(). Refactor to call try await super.setUp() first, then override only what's needed for experiment setup.
🤖 Prompt for AI Agents
In `@firefox-ios/firefox-ios-tests/Tests/XCUITests/FeatureFlaggedTestBase.swift`
around lines 46 - 52, The override of setUp() in FeatureFlaggedTestBase
duplicates parent initialization; change it to call try await super.setUp() at
the top of FeatureFlaggedTestBase.setUp(), keep continueAfterFailure = false if
needed, then only perform test-specific setup like setUpExperimentVariables()
and setUpScreenGraph(); remove the direct calls to setUpApp() and
setUpLaunchArguments() here since the base class (and FeatureFlaggedTestBase's
setUpApp override) should manage app launch timing and launch args.
Benchmark PR from agentic-review-benchmarks#2
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.