up
This commit is contained in:
@@ -87,4 +87,29 @@ test.describe('a11y-smoke', () => {
|
||||
description: `${violations.length} violations (/graph)`,
|
||||
});
|
||||
});
|
||||
|
||||
test('triage VEX modal', async ({ page }, testInfo) => {
|
||||
await page.goto('/triage/artifacts/asset-web-prod');
|
||||
await expect(page.getByRole('heading', { name: 'Artifact triage' })).toBeVisible({ timeout: 10000 });
|
||||
|
||||
await page.getByRole('button', { name: 'VEX' }).first().click();
|
||||
await expect(page.getByRole('dialog', { name: 'VEX decision' })).toBeVisible({ timeout: 10000 });
|
||||
|
||||
const results = await new AxeBuilder({ page })
|
||||
.withTags(['wcag2a', 'wcag2aa'])
|
||||
.include('.modal__container')
|
||||
.analyze();
|
||||
|
||||
const violations = [...results.violations].sort((a, b) => a.id.localeCompare(b.id));
|
||||
await writeReport('a11y-triage_vex_modal.json', { url: page.url(), violations });
|
||||
|
||||
if (shouldFail) {
|
||||
expect(violations).toEqual([]);
|
||||
}
|
||||
|
||||
testInfo.annotations.push({
|
||||
type: 'a11y',
|
||||
description: `${violations.length} violations (/triage VEX modal)`,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user