diff --git a/cypress/integration/accordion.test.ts b/cypress/integration/accordion.test.ts index 97766ee162..059a5b1dde 100644 --- a/cypress/integration/accordion.test.ts +++ b/cypress/integration/accordion.test.ts @@ -16,7 +16,7 @@ describe("accordion", () => { describe("given a single accordion", () => { it("should have no accessibility violation", () => { - cy.checkA11y("[data-part=root]") + cy.findByPart("root").then(cy.checkA11y) }) describe("when navigating by keyboard", () => { @@ -54,7 +54,7 @@ describe("accordion", () => { }) it("should have no accessibility violations", () => { - cy.checkA11y(".accordion") + cy.findByPart("root").then(cy.checkA11y) }) it("then clicking the same trigger again: should not close the content", () => { @@ -80,7 +80,7 @@ describe("accordion", () => { }) it("should have no accessibility violations", () => { - cy.checkA11y(".accordion") + cy.findByPart("root").then(cy.checkA11y) }) describe("when navigating by keyboard", () => { @@ -119,7 +119,7 @@ describe("accordion", () => { }) it("should have no accessibility violations", () => { - cy.checkA11y(".accordion") + cy.findByPart("root").then(cy.checkA11y) }) it("then clicking the same trigger again: should hide the content", () => {