Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

UITests: New tests for save Login prompt #8381

Merged

Conversation

isabelrios
Copy link
Contributor

This PR adds tests for the Save Login prompt feature

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.

After merge

  • Milestone: Make sure issues finished by this pull request are added to the milestone of the version currently in development.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture

@codecov-io
Copy link

codecov-io commented Feb 13, 2020

Codecov Report

Merging #8381 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #8381      +/-   ##
============================================
- Coverage     18.59%   18.57%   -0.03%     
  Complexity      459      459              
============================================
  Files           319      318       -1     
  Lines         12728    12616     -112     
  Branches       1680     1662      -18     
============================================
- Hits           2367     2343      -24     
+ Misses        10161    10074      -87     
+ Partials        200      199       -1
Impacted Files Coverage Δ Complexity Δ
.../src/main/java/org/mozilla/fenix/utils/Settings.kt 74.78% <0%> (-4.5%) 28% <0%> (ø)
...rc/main/java/org/mozilla/fenix/FenixApplication.kt 13.67% <0%> (-0.62%) 3% <0%> (ø)
...nix/components/toolbar/BrowserToolbarController.kt 58.52% <0%> (-0.44%) 0% <0%> (ø)
...pp/src/main/java/org/mozilla/fenix/HomeActivity.kt 11.03% <0%> (-0.08%) 10% <0%> (ø)
...pp/src/main/java/org/mozilla/fenix/FeatureFlags.kt 0% <0%> (ø) 0% <0%> (ø) ⬇️
...a/fenix/settings/DefaultBrowserSettingsFragment.kt 0% <0%> (ø) 0% <0%> (ø) ⬇️
...n/java/org/mozilla/fenix/IntentReceiverActivity.kt 0% <0%> (ø) 0% <0%> (ø) ⬇️
...s/deletebrowsingdata/DeleteBrowsingDataFragment.kt 0% <0%> (ø) 0% <0%> (ø) ⬇️
.../fenix/settings/account/AccountSettingsFragment.kt 0% <0%> (ø) 0% <0%> (ø) ⬇️
.../mozilla/fenix/settings/PrivateBrowsingFragment.kt 0% <0%> (ø) 0% <0%> (ø) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0206082...8ffda8b. Read the comment docs.

}.openThreeDotMenu {
}.openSettings {
// Necessary to scroll a little bit for all screen sizes
TestHelper.scrollToElementByText("Logins and passwords")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.


navigationToolbar {
}.enterURLAndEnterToBrowser(saveLoginTest.url) {
mDevice.waitNotNull(Until.findObjects(By.text("test@example.com")), TestAssetHelper.waitingTime)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think moving all of these methods into the browser robot will make it easier to read what is going on in this test class.

}.openHomeScreen {
}.openThreeDotMenu {
}.openSettings {
TestHelper.scrollToElementByText("Logins and passwords")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this into the openLoginsAndPasswordSubmenu function. This way anytime you expect to open the menu, the function will scroll there for you.

@AaronMT AaronMT removed their request for review February 18, 2020 16:21
@sv-ohorvath sv-ohorvath merged commit 4582c25 into mozilla-mobile:master Feb 19, 2020
Sparky93 pushed a commit to Sparky93/fenix that referenced this pull request Feb 25, 2020
* UITests: New tests for save Login prompt

* fixing firebase timing issues when webpage loads

* adding tests for don't save and check the prompt options

* fix detekt issue

* fix reviewer comments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants