Skip to content

Commit

Permalink
test: e2e 테스트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ShinYoung-Kim committed Oct 17, 2024
1 parent ca8a87c commit 8a8297b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions e2e/components/primitive/loading.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Page, expect, test } from "@playwright/test";

import { axeAccessibilityScan } from "../../test-utils/a11y";
import { visit } from "../../test-utils/storybook";

test.describe("loading 컴포넌트", () => {
test("기본 시각적 회귀 테스트를 통과해야 합니다.", async ({ page }: { page: Page }) => {
await visit(page, {
id: "ui-loading--default",
});

await expect(page).toHaveScreenshot();
});

test("axe를 사용한 웹 접근성 테스트를 통과해야 합니다.", async ({ page }: { page: Page }) => {
await visit(page, {
id: "ui-loading--default",
});

const accessibilityScanResults = await axeAccessibilityScan(page);
expect(accessibilityScanResults.violations).toEqual([]);
});
});

0 comments on commit 8a8297b

Please sign in to comment.