diff --git a/workspaces/theme/packages/app-legacy/e2e-tests/custom-theme.spec.ts b/workspaces/theme/packages/app-legacy/e2e-tests/custom-theme.spec.ts index fa5ac6b3e8..4b491e0bf5 100644 --- a/workspaces/theme/packages/app-legacy/e2e-tests/custom-theme.spec.ts +++ b/workspaces/theme/packages/app-legacy/e2e-tests/custom-theme.spec.ts @@ -38,12 +38,7 @@ test.describe('CustomTheme should be applied', () => { }, testInfo: TestInfo) => { const themes = ThemeConstants.getThemes(); - await runAccessibilityTests( - page, - testInfo, - 'accessibility-scan-results.json', - { skipViolationsAssert: true }, - ); + await runAccessibilityTests(page, testInfo); for (const theme of themes) { await themeVerifier.setTheme(theme.name); @@ -86,7 +81,6 @@ test.describe('CustomTheme should be applied', () => { page, testInfo, `${themeName}-${tab}-accessibility`, - { skipViolationsAssert: true }, ); for (const subTab of subTabs) { await page.getByRole('tab', { name: subTab }).click(); @@ -94,7 +88,6 @@ test.describe('CustomTheme should be applied', () => { page, testInfo, `${themeName}-${tab}-${subTab}-accessibility`, - { skipViolationsAssert: true }, ); } } diff --git a/workspaces/theme/packages/app-legacy/e2e-tests/utils/acessibility.ts b/workspaces/theme/packages/app-legacy/e2e-tests/utils/acessibility.ts index 4854d7f9e3..f4ccda5496 100644 --- a/workspaces/theme/packages/app-legacy/e2e-tests/utils/acessibility.ts +++ b/workspaces/theme/packages/app-legacy/e2e-tests/utils/acessibility.ts @@ -20,9 +20,6 @@ export async function runAccessibilityTests( page: Page, testInfo: TestInfo, attachName = 'accessibility-scan-results.json', - options: { skipViolationsAssert?: boolean; attachName?: string } = { - skipViolationsAssert: false, - }, ) { const accessibilityScanResults = await new AxeBuilder({ page }) .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']) @@ -33,10 +30,8 @@ export async function runAccessibilityTests( contentType: 'application/json', }); - if (!options?.skipViolationsAssert) { - expect( - accessibilityScanResults.violations, - 'Accessibility violations found', - ).toEqual([]); - } + expect( + accessibilityScanResults.violations, + 'Accessibility violations found', + ).toEqual([]); } diff --git a/workspaces/theme/packages/app/e2e-tests/custom-theme.spec.ts b/workspaces/theme/packages/app/e2e-tests/custom-theme.spec.ts index 12a45335fe..ecc27f9d62 100644 --- a/workspaces/theme/packages/app/e2e-tests/custom-theme.spec.ts +++ b/workspaces/theme/packages/app/e2e-tests/custom-theme.spec.ts @@ -38,12 +38,7 @@ test.describe('CustomTheme should be applied', () => { }, testInfo: TestInfo) => { const themes = ThemeConstants.getThemes(); - await runAccessibilityTests( - page, - testInfo, - 'accessibility-scan-results.json', - { skipViolationsAssert: true }, - ); + await runAccessibilityTests(page, testInfo); for (const theme of themes) { await themeVerifier.setTheme(theme.name); @@ -82,7 +77,6 @@ test.describe('CustomTheme should be applied', () => { page, testInfo, `${themeName}-${tab}-accessibility`, - { skipViolationsAssert: true }, ); for (const subTab of subTabs) { await page.getByRole('tab', { name: subTab }).click(); @@ -90,7 +84,6 @@ test.describe('CustomTheme should be applied', () => { page, testInfo, `${themeName}-${tab}-${subTab}-accessibility`, - { skipViolationsAssert: true }, ); } } diff --git a/workspaces/theme/packages/app/e2e-tests/utils/acessibility.ts b/workspaces/theme/packages/app/e2e-tests/utils/acessibility.ts index 4854d7f9e3..f4ccda5496 100644 --- a/workspaces/theme/packages/app/e2e-tests/utils/acessibility.ts +++ b/workspaces/theme/packages/app/e2e-tests/utils/acessibility.ts @@ -20,9 +20,6 @@ export async function runAccessibilityTests( page: Page, testInfo: TestInfo, attachName = 'accessibility-scan-results.json', - options: { skipViolationsAssert?: boolean; attachName?: string } = { - skipViolationsAssert: false, - }, ) { const accessibilityScanResults = await new AxeBuilder({ page }) .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']) @@ -33,10 +30,8 @@ export async function runAccessibilityTests( contentType: 'application/json', }); - if (!options?.skipViolationsAssert) { - expect( - accessibilityScanResults.violations, - 'Accessibility violations found', - ).toEqual([]); - } + expect( + accessibilityScanResults.violations, + 'Accessibility violations found', + ).toEqual([]); }