Add main site navigation tests for desktop and mobile views#3575
Conversation
|
@alexgibson r? |
There was a problem hiding this comment.
Is there a reason we need to check the height of the menu here? Technically this could change depending on the string/translation.
There was a problem hiding this comment.
Ah, yes! I'd love to have a better indication that the menu is showing. I can't use is_displayed because then it tries clicking while it's still animating. I could wait for the height to stop changing, but ideally I'd wait for something more concrete. Do you have any suggestions?
There was a problem hiding this comment.
Looking at the code, we add aria-expanded="true" to the _toggle_locator element once the menu opens. Perhaps we could use this?
There was a problem hiding this comment.
It looks like this attribute is added before the menu is open, as this is failing for me in 2/5 tests.
There was a problem hiding this comment.
I wonder if we can adjust the code here to make testing easier, I'll take a look
There was a problem hiding this comment.
Opened a PR which should hopefully make things easier: #3577
|
@davehunt - re: sanity tests, given that these take some time to complete (and one link is also external), perhaps it would be better to have a single santity test that just opens/closes the mobile menu, but doesn't traverse all the links. Thoughts? |
I agree that we should probably avoid depending on an external site for our sanity tests. Do we even need to check the donate menu item given that we're planning to introduce a much more thorough link checker in the near future? I'd suggest dropping the donate check from both tests, and marking just the mobile test as sanity. |
Ok, sounds reasonable to me 👍 |
bba85d0 to
bc35334
Compare
|
Rebased and ready for review again. Note that we need #3577 to land before we merge this, but after review I can squash and prepare for the merge. |
|
LGTM r+ pending #3577 Let's squash & wait for the other PR to merge. Will give these tests a final run once that's in master 👍 |
bc35334 to
37ce325
Compare
|
Squashed and rebased! |
|
r+ 🍟 |
Add main site navigation tests for desktop and mobile views
This replaces the following tests from https://github.com/mozilla/mcom-tests:
The main differences are: