fenix
fenix copied to clipboard
For #26936 and #26818 fix saveLoginFromPromptTest and neverSaveLoginFromPromptTest UI tests
For #26936 and #26818 fix saveLoginFromPromptTest and neverSaveLoginFromPromptTest UI tests ✅ successfully passed 100x on Firebase.
Sometimes it failed to click the "Login" button from the form, so I've wrapped it in a retry for loop.
Pull Request checklist
- [ ] Tests: This PR includes thorough tests or an explanation of why it does not
- [ ] Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
- [ ] Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.
QA
- [ ] QA Needed
To download an APK when reviewing a PR (after all CI tasks finished running):
- Click on
Checksat the top of the PR page. - Click on the
firefoxci-taskclustergroup on the left to expand all tasks. - Click on the
build-debugtask. - Click on
View task in Taskclusterin the newDETAILSsection. - The APK links should be on the right side of the screen, named for each CPU architecture.
GitHub Automation
Fixes #26936 Fixes #26818
I see a NullPointerException from https://console.firebase.google.com/u/1/project/moz-fenix/testlab/histories/bh.66b7091e15d53d45/matrices/8464498623874392497/details?stepId=bs.8f9e67cf1e1834d6&testCaseId=2 might have to account for that too
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object androidx.test.uiautomator.UiObject2.clickAndWait(androidx.test.uiautomator.EventCondition, long)' on a null object reference at org.mozilla.fenix.ui.robots.BrowserRobot.verifySaveLoginPromptIsShown(BrowserRobot.kt:480) at org.mozilla.fenix.ui.SettingsPrivacyTest$saveLoginFromPromptTest$2.invoke(SettingsPrivacyTest.kt:220) at org.mozilla.fenix.ui.SettingsPrivacyTest$saveLoginFromPromptTest$2.invoke(SettingsPrivacyTest.kt:219) at org.mozilla.fenix.ui.robots.NavigationToolbarRobot$Transition.enterURLAndEnterToBrowser(NavigationToolbarRobot.kt:109) at org.mozilla.fenix.ui.SettingsPrivacyTest.saveLoginFromPromptTest(SettingsPrivacyTest.kt:219)
The NullPointerException is thrown when an action is not performed properly when using By selector.
For UiSelector the exception is UiObjectNotFoundException