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

Selecting wrong menu items #1530

Closed
alisterscott opened this issue Oct 16, 2018 · 4 comments
Closed

Selecting wrong menu items #1530

alisterscott opened this issue Oct 16, 2018 · 4 comments

Comments

@alisterscott
Copy link
Contributor

If you run the tests without retrying it's common to see the tests selecting the wrong item in the menu sidebar and then failing as the incorrect screen is shown

Something is funky with how we click these sidebar items - we should investigate why

To reproduce change "max_test_attempts": 3, to "max_test_attempts": 1, in magellan.json and commit the change to see the failures in CircleCI for a branch

@Stojdza
Copy link
Contributor

Stojdza commented Oct 18, 2018

This happened recently for 'People' page when I ran tests locally. It was failing randomly.
@alisterscott What do you think to change the way how we are getting these elements? Instead of '.sites-navigation [data-tip-target="people"] a' to add data-e2e attribute to class menu-link-text for every item in sidebar?

screen shot 2018-10-18 at 14 39 02

@alisterscott
Copy link
Contributor Author

We can pass .menu-link-text as a selector and item name from the sidebar to selectElementByText()

I think we should try to avoid selecting menu items by text since they're translated and won't work in other languages, eg for i18n tests, and also menu text is more likely to change than a specific attribute. Or do I misunderstand something?

1 similar comment
@alisterscott
Copy link
Contributor Author

We can pass .menu-link-text as a selector and item name from the sidebar to selectElementByText()

I think we should try to avoid selecting menu items by text since they're translated and won't work in other languages, eg for i18n tests, and also menu text is more likely to change than a specific attribute. Or do I misunderstand something?

@Stojdza
Copy link
Contributor

Stojdza commented Oct 22, 2018

@alisterscott I replied to this comment here. So yes, data e2e attribute would be more stable solution.

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

No branches or pull requests

2 participants