-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
harden autocomplete test #8603
harden autocomplete test #8603
Conversation
cy.login(); | ||
cy.visit("/"); | ||
cy.get("input[data-testid=search-input]").type("baz"); | ||
|
||
cy.get('[data-testid="auto-complete-option--urn:li:chart:(looker,baz2)"'); | ||
cy.get('[data-testid="quick-filter-DASHBOARD"]').click(); | ||
cy.wait(2000); | ||
cy.get( | ||
'[data-testid="auto-complete-option--urn:li:chart:(looker,baz2)"' | ||
).should("not.exist"); | ||
cy.contains("Baz Dashboard"); | ||
cy.wait(1000); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff is hard to read... but the change here is is in the selectors in this test. Basically we attach urns to each data-testid in the autocomplete and makes selecting them simple. This way, we don't accidentally select "Baz Chart 2" which is sitting behind the autocomplete on a couple of links.
Checklist