Skip to content

Commit

Permalink
Make autocomplete spec more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
dpiatek committed Dec 14, 2023
1 parent a9ae563 commit b6fd9a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/core/company_autocomplete/behaviour.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ describe("Company Autocomplete", () => {

it("closes the dropdown when clicked outside it", () => {
cy.get("input")
.type("A")
.get("body")
.click()
.get(CONTAINER_SELECTOR)
.type("A");
cy.contains("Company Autocomplete") // clicking on the body is error-prone in cypress, get an element we know is on the test page
.click();
cy.get(CONTAINER_SELECTOR)
.should("not.be.visible");
});

Expand Down

0 comments on commit b6fd9a3

Please sign in to comment.