Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/tests/component/va-p28b-feature-flag-rollout.ct.tsx
T

38 lines
1.4 KiB
TypeScript

import AxeBuilder from "@axe-core/playwright";
import { expect, test } from "@playwright/experimental-ct-react";
import { AdminFeatureFlagBulkVisualFixture as VisualFixture } from "../../apps/web/app/components/screens/admin/sales/feature-flags/admin-feature-flag-bulk.visual-fixture";
test.describe("VA-P28b feature-flag rollout interim UI", () => {
test("shows deterministic rollout sources and stays visually stable", async ({ mount, page }) => {
const component = await mount(
<div data-testid="va-p28b-feature-flag-rollout" style={{ width: "1280px", minHeight: "760px" }}>
<VisualFixture />
</div>
);
await page.evaluate(async () => {
await document.fonts.ready;
});
await expect(component.locator('[data-ui-id="ui.admin.sales.featureFlags.bulkPage"]')).toHaveCount(1);
await expect(component.getByText("Muster SHK GmbH")).toBeVisible();
await expect(component).toHaveScreenshot("va-p28b-feature-flag-rollout.png");
});
test("meets WCAG 2 A/AA", async ({ mount, page }) => {
await mount(
<div style={{ width: "1280px", minHeight: "760px" }}>
<VisualFixture />
</div>
);
const results = await new AxeBuilder({ page })
.include('[data-ui-id="ui.admin.sales.featureFlags.bulkPage"]')
.withTags(["wcag2a", "wcag2aa"])
.analyze();
expect(results.violations).toEqual([]);
});
});