Skip to content

Commit

Permalink
replace axe test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocio De Santiago authored and Rocio De Santiago committed Aug 27, 2024
1 parent d71a1da commit 67c016b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
10 changes: 2 additions & 8 deletions services/ui-src/src/components/accordions/FaqAccordion.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
import { testA11y } from "utils/testing/commonTests";
import userEvent from "@testing-library/user-event";
import { RouterWrappedComponent } from "utils/testing/setupJest";
import { FaqAccordion } from "components";
Expand Down Expand Up @@ -39,12 +39,6 @@ describe("Test FaqAccordion", () => {
expect(faqQuestion).toBeVisible();
expect(screen.getByText(accordionItems[0].answer)).toBeVisible();
});
});

describe("Test FaqAccordion accessibility", () => {
it("Should not have basic accessibility issues", async () => {
const { container } = render(faqAccordionComponent);
const results = await axe(container);
expect(results).toHaveNoViolations();
});
testA11y(faqAccordionComponent);
});
10 changes: 2 additions & 8 deletions services/ui-src/src/components/cards/Card.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
import { testA11y } from "utils/testing/commonTests";
import { Card } from "components";

const cardComponent = (
Expand All @@ -16,12 +16,6 @@ describe("Test Card", () => {
test("Card is visible", () => {
expect(screen.getByTestId("card")).toBeVisible();
});
});

describe("Test Card accessibility", () => {
it("Should not have basic accessibility issues", async () => {
const { container } = render(cardComponent);
const results = await axe(container);
expect(results).toHaveNoViolations();
});
testA11y(cardComponent);
});
10 changes: 2 additions & 8 deletions services/ui-src/src/components/cards/EmailCard.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
import { testA11y } from "utils/testing/commonTests";
import { EmailCard } from "components";
import { createEmailLink } from "utils/other/email";
import verbiage from "verbiage/pages/help";
Expand Down Expand Up @@ -34,12 +34,6 @@ describe("Test EmailCard", () => {
test("Email links are visible", () => {
expect(screen.getByRole("link")).toBeVisible();
});
});

describe("Test EmailCard accessibility", () => {
it("Should not have basic accessibility issues", async () => {
const { container } = render(emailCardComponent);
const results = await axe(container);
expect(results).toHaveNoViolations();
});
testA11y(emailCardComponent);
});

0 comments on commit 67c016b

Please sign in to comment.