fenix icon indicating copy to clipboard operation
fenix copied to clipboard

For #26936 and #26818 fix saveLoginFromPromptTest and neverSaveLoginFromPromptTest UI tests

Open AndiAJ opened this issue 3 years ago • 2 comments

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):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-debug task.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

Fixes #26936 Fixes #26818

AndiAJ avatar Sep 22 '22 12:09 AndiAJ

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)

AaronMT avatar Sep 23 '22 04:09 AaronMT

The NullPointerException is thrown when an action is not performed properly when using By selector. For UiSelector the exception is UiObjectNotFoundException

AndiAJ avatar Sep 23 '22 06:09 AndiAJ