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

Replaces verifyPageContent in UI tests #12499

Merged
merged 1 commit into from
Jul 16, 2020
Merged

Replaces verifyPageContent in UI tests #12499

merged 1 commit into from
Jul 16, 2020

Conversation

sv-ohorvath
Copy link
Contributor

@sv-ohorvath sv-ohorvath commented Jul 13, 2020

For: mozilla-mobile/mobile-test-eng#51
Replaced verifyPageContent with verifyUrl where it was fit.
Replaced with waitForIdle where it was only used to wait for the page load.
Changed the assertion method in verifyPageContent for verifying the page refresh. This assertion is also used now in MediaNotificationTest (the prior method returned a false positive) - I'll keep an eye on these for a while.
note:
Tests passed on running ~50 times on Firebase: https://github.com/mozilla-mobile/fenix/runs/857803644, https://github.com/mozilla-mobile/fenix/runs/858196969

@AaronMT
Copy link
Contributor

AaronMT commented Jul 13, 2020

Im having trouble understanding how it's any different as both were waiting for an object. Can you explain a little bit? Also, I would run this a bunch of times to check.

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2020

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #12499      +/-   ##
============================================
+ Coverage     24.94%   24.97%   +0.02%     
  Complexity      836      836              
============================================
  Files           389      389              
  Lines         15657    15657              
  Branches       2022     2022              
============================================
+ Hits           3906     3910       +4     
+ Misses        11439    11434       -5     
- Partials        312      313       +1     
Impacted Files Coverage Δ Complexity Δ
...nix/components/toolbar/BrowserToolbarController.kt 69.64% <0.00%> (+2.38%) 0.00% <0.00%> (ø%)

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 6be39ae...04ed969. Read the comment docs.

@sv-ohorvath sv-ohorvath marked this pull request as ready for review July 14, 2020 15:43
@sv-ohorvath
Copy link
Contributor Author

Im having trouble understanding how it's any different as both were waiting for an object. Can you explain a little bit? Also, I would run this a bunch of times to check.

Im having trouble understanding how it's any different as both were waiting for an object. Can you explain a little bit? Also, I would run this a bunch of times to check.

So after talking a bit more with mcarare, the difference between waitNotNull and waitForExists would be that the first is trying to find a view in the hierarchy at regular intervals before reaching the timeout, and the later is searching for an accessibility node info and waits for the view to become visible. I chose waitForExists because it's a method of UiObject and not an extension.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
eng:ui-test UI Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants