Skip to content

Commit

Permalink
fix(cypress): attempt to fix autocomplete test (#8619)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Eilers authored Aug 12, 2023
1 parent 11fdfcf commit 0d06ca6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function AutoCompleteEntity({ query, entity, hasParentTooltip }:
const subtype = genericEntityProps?.subTypes?.typeNames?.[0];

return (
<AutoCompleteEntityWrapper>
<AutoCompleteEntityWrapper data-testid={`auto-complete-entity-name-${displayName}`}>
<ContentWrapper>
{icon}
<SuggestionText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ export default function AutoCompleteItem({ query, entity }: Props) {
placement="top"
color="rgba(0, 0, 0, 0.9)"
>
<SuggestionContainer data-testid={`auto-complete-option--${entity.urn}`}>
{componentToRender}
</SuggestionContainer>
<SuggestionContainer data-testid="auto-complete-option">{componentToRender}</SuggestionContainer>
</Tooltip>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ describe("auto-complete", () => {
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="auto-complete-entity-name-Baz Chart 2');
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.get('[data-testid="auto-complete-entity-name-Baz Chart 2').should(
"not.exist"
);
cy.contains("Baz Dashboard");
cy.wait(1000);
});
Expand Down

0 comments on commit 0d06ca6

Please sign in to comment.