Skip to content

Commit fc1163f

Browse files
authored
fix(cypress): fix issue with cypress and vercel previews (#4088)
1 parent 607d233 commit fc1163f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cypress/integration/sidebar-navigation/index.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ describe("Sidebar navigation", () => {
3030
const contentSelector = `${BASE}-content-${disclosureName}`;
3131

3232
it(`should open the the "${disclosureName}" sidebar disclosure`, () => {
33-
cy.get(`[data-cy="${buttonSelector}"]`).click().should("have.attr", "aria-expanded", "true");
3433
// creates an alias for the content
3534
cy.get(`[data-cy="${contentSelector}"]`).as("currentContent");
35+
cy.get("@currentContent").should("have.css", "display", "none");
36+
cy.get("@currentContent").should("have.attr", "hidden", "hidden");
3637

37-
cy.get("@currentContent").scrollIntoView().should("be.visible");
38+
cy.get(`[data-cy="${buttonSelector}"]`).click().should("have.attr", "aria-expanded", "true");
39+
cy.get("@currentContent").scrollIntoView().should("have.css", "display", "block");
3840
});
3941
});
4042

0 commit comments

Comments
 (0)