Skip to content

Commit

Permalink
fix(react): update Cypress tests following the restructure of the tog…
Browse files Browse the repository at this point in the history
…gle variant of ic-menu-item

Uncomment Cypress accessibility tests that were previously failing

. #2722
  • Loading branch information
GCHQ-Developer-112 committed Jan 2, 2025
1 parent 11eb2e3 commit 3084bd5
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
cy.checkHydrated(POPOVER_SELECTOR);
cy.get(BUTTON_SELECTOR).click().wait(500);

//cy.checkA11yWithWait();
cy.checkA11yWithWait();
cy.compareSnapshot({
name: "default-after-click-button",
testThreshold: setThresholdBasedOnEnv(DEFAULT_TEST_THRESHOLD + 0.17),
Expand Down Expand Up @@ -96,7 +96,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
cy.checkHydrated(POPOVER_SELECTOR);
cy.get(BUTTON_SELECTOR).click().wait(500);

// cy.checkA11yWithWait();
cy.checkA11yWithWait();
cy.compareSnapshot({
name: "description",
testThreshold: setThresholdBasedOnEnv(DEFAULT_TEST_THRESHOLD + 0.031),
Expand Down Expand Up @@ -128,7 +128,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
cy.get("@handleMenuItemClick").should(NOT_HAVE_BEEN_CALLED);
cy.get("@triggerPopoverMenuInstance").should(NOT_BE_CALLED_ONCE);

// cy.checkA11yWithWait();
cy.checkA11yWithWait();
cy.compareSnapshot({
name: "disabled",
testThreshold: setThresholdBasedOnEnv(DEFAULT_TEST_THRESHOLD),
Expand All @@ -143,7 +143,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
cy.get(BUTTON_SELECTOR).click();
cy.realPress("ArrowDown").wait(250);

//cy.checkA11yWithWait();
cy.checkA11yWithWait();
cy.compareSnapshot({
name: "disabled-focused",
testThreshold: setThresholdBasedOnEnv(DEFAULT_TEST_THRESHOLD + 0.004),
Expand All @@ -156,7 +156,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
cy.checkHydrated(POPOVER_SELECTOR);
cy.get(BUTTON_SELECTOR).click().wait(500);

// cy.checkA11yWithWait();
cy.checkA11yWithWait();
cy.compareSnapshot({
name: "variants",
testThreshold: setThresholdBasedOnEnv(DEFAULT_TEST_THRESHOLD + 0.043),
Expand All @@ -182,7 +182,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
cy.checkHydrated(POPOVER_SELECTOR);
cy.get(BUTTON_SELECTOR).click().wait(500);

// cy.checkA11yWithWait();
cy.checkA11yWithWait();
cy.compareSnapshot({
name: "max-height",
testThreshold: setThresholdBasedOnEnv(DEFAULT_TEST_THRESHOLD + 0.024),
Expand All @@ -208,7 +208,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
mount(<PopoverDropdown />);

cy.checkHydrated(POPOVER_SELECTOR);
// cy.checkA11yWithWait();
cy.checkA11yWithWait();

cy.get(POPOVER_SELECTOR).invoke(
"on",
Expand All @@ -226,7 +226,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
mount(<PopoverDropdown />);

cy.checkHydrated(POPOVER_SELECTOR);
// cy.checkA11yWithWait();
cy.checkA11yWithWait();

cy.get(POPOVER_SELECTOR).invoke(
"on",
Expand Down Expand Up @@ -323,7 +323,7 @@ describe("IcPopoverMenu end-to-end, visual regression and a11y tests", () => {
mount(<PopoverMenuDescription />);

cy.checkHydrated(POPOVER_SELECTOR);
// cy.checkA11yWithWait();
cy.checkA11yWithWait();

cy.get(POPOVER_SELECTOR).invoke(
"on",
Expand Down

0 comments on commit 3084bd5

Please sign in to comment.