-
Notifications
You must be signed in to change notification settings - Fork 0
[MTE-5047] - auto tests improvements #39
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_mte-5047_-_auto_tests_improvements_pr13
Are you sure you want to change the base?
[MTE-5047] - auto tests improvements #39
Conversation
WalkthroughThe pull request enables a previously skipped test ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 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: 1
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/BaseTestCase.swift (1)
463-472: Definespringboardbefore using it.
springboardisn’t defined in this file or this method, so this will not compile unless a global exists elsewhere. Safer to define it locally here.Proposed fix
pasteAction.waitAndTap() - springboard.buttons["Allow Paste"].tapIfExists(timeout: 0.5) + let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard") + springboard.buttons["Allow Paste"].tapIfExists(timeout: 0.5)firefox-ios/firefox-ios-tests/Tests/XCUITests/ShareLongPressTests.swift (1)
47-58: Renaming drops XCTest discovery.Methods without the
testprefix won’t run. If this is meant to stay as a test, rename it back or ensure test plans reference the new name explicitly.Proposed fix
- func verifyBookmarksShareNormalWebsiteReminders() { + func testBookmarksShareNormalWebsiteReminders() {
🤖 Fix all issues with AI agents
In `@firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift`:
- Around line 28-35: The tearDown currently returns early under iOS 17 and skips
essential cleanup; instead of returning, only skip the theme change: inside
tearDown keep the availability check and the condition using
self.name.contains("testSelectBottomPlacement") || iPad() to decide whether to
call switchThemeToDarkOrLight(theme: "Light"), but do not return — always call
app.terminate() and super.tearDown() after that block so cleanup runs regardless
of the theme gate.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
firefox-ios/firefox-ios-tests/Tests/AccessibilityTestPlan.xctestplanfirefox-ios/firefox-ios-tests/Tests/Smoketest.xctestplanfirefox-ios/firefox-ios-tests/Tests/TAESmokeTestPlan.xctestplanfirefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swiftfirefox-ios/firefox-ios-tests/Tests/XCUITests/ShareLongPressTests.swift
💤 Files with no reviewable changes (3)
- firefox-ios/firefox-ios-tests/Tests/Smoketest.xctestplan
- firefox-ios/firefox-ios-tests/Tests/AccessibilityTestPlan.xctestplan
- firefox-ios/firefox-ios-tests/Tests/TAESmokeTestPlan.xctestplan
🧰 Additional context used
🧬 Code graph analysis (2)
firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift (1)
firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (2)
iPad(357-362)switchThemeToDarkOrLight(439-461)
firefox-ios/firefox-ios-tests/Tests/XCUITests/ShareLongPressTests.swift (2)
firefox-ios/Client/Frontend/Library/LibraryPanelContextMenu.swift (1)
contextMenu(35-47)firefox-ios/firefox-ios-tests/Tests/XCUITests/BaseTestCase.swift (2)
pressWithRetry(651-669)waitAndTap(628-631)
🔇 Additional comments (2)
firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift (1)
347-352: LGTM: explicit iPad skip for bottom placement.firefox-ios/firefox-ios-tests/Tests/XCUITests/ShareLongPressTests.swift (1)
246-250: Nice stability improvement with context menu + retry.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| if #available(iOS 17.0, *) { | ||
| switchThemeToDarkOrLight(theme: "Light") | ||
| if self.name.contains("testSelectBottomPlacement") || iPad() { | ||
| // Toolbar option not available for iPad, so the theme is not changed there. | ||
| return | ||
| } else { | ||
| switchThemeToDarkOrLight(theme: "Light") | ||
| } | ||
| } |
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.
Avoid early return in tearDown that skips cleanup.
On iOS 17, this returns before app.terminate() and super.tearDown(), which can leak state across tests. Gate only the theme switch, not the full teardown.
Proposed fix
override func tearDown() async throws {
if `#available`(iOS 17.0, *) {
- if self.name.contains("testSelectBottomPlacement") || iPad() {
- // Toolbar option not available for iPad, so the theme is not changed there.
- return
- } else {
- switchThemeToDarkOrLight(theme: "Light")
- }
+ if !(self.name.contains("testSelectBottomPlacement") || iPad()) {
+ switchThemeToDarkOrLight(theme: "Light")
+ }
}
app.terminate()
try await super.tearDown()
}🤖 Prompt for AI Agents
In `@firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift` around
lines 28 - 35, The tearDown currently returns early under iOS 17 and skips
essential cleanup; instead of returning, only skip the theme change: inside
tearDown keep the availability check and the condition using
self.name.contains("testSelectBottomPlacement") || iPad() to decide whether to
call switchThemeToDarkOrLight(theme: "Light"), but do not return — always call
app.terminate() and super.tearDown() after that block so cleanup runs regardless
of the theme gate.
Benchmark PR from agentic-review-benchmarks#13
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.