Skip to content
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

Merged

Conversation

joshuaeilers
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX smoke_test Contains changes related to smoke tests labels Aug 9, 2023
Comment on lines 37 to 50
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);
});
Copy link
Contributor Author

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.

@joshuaeilers joshuaeilers marked this pull request as ready for review August 9, 2023 18:05
@joshuaeilers joshuaeilers merged commit e631fc9 into datahub-project:master Aug 9, 2023
32 of 34 checks passed
@joshuaeilers joshuaeilers deleted the je--harden-autocomplete-test branch August 9, 2023 19:19
yoonhyejin pushed a commit that referenced this pull request Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX smoke_test Contains changes related to smoke tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants