Testing Framwork #17

Merged
an.di merged 83 commits from adilallo/enhancement/TestingFramework2 into main 2025-09-03 18:50:40 +00:00
2 changed files with 9 additions and 7 deletions
Showing only changes of commit 8969ead3bf - Show all commits
+3 -3
View File
@@ -61,7 +61,7 @@ jobs:
- run: npm run build
# start app, wait, run tests
- run: npm run preview &
- run: npm run start &
env: { CI: true }
- run: npx wait-on http://localhost:3000
- run: npx playwright test --project=${{ matrix.browser }}
@@ -90,7 +90,7 @@ jobs:
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run build
- run: npm run preview &
- run: npm run start &
env: { CI: true }
- run: npx wait-on http://localhost:3000
@@ -139,7 +139,7 @@ jobs:
run: npm run build
- name: Start application
run: npm run preview &
run: npm run start &
env: { CI: true }
- name: Wait for application
+6 -4
View File
@@ -2,11 +2,13 @@ import { AxeBuilder } from "@axe-core/playwright";
export async function runA11y(page, options = {}) {
const results = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa'])
.withTags(["wcag2a", "wcag2aa"])
.analyze();
if (results.violations.length > 0) {
console.log('Accessibility violations found:', results.violations);
throw new Error(`Found ${results.violations.length} accessibility violations`);
console.log("Accessibility violations found:", results.violations);
throw new Error(
`Found ${results.violations.length} accessibility violations`
);
}
}