Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
ci: {
collect: {
numberOfRuns: 3,
staticDistDir: './frontend/dist', // Points directly to the built bundle output
},
assert: {
assertions: {
'categories:performance': ['error', { minScore: 0.90 }],
// Task Requirement: Enforce strict performance budgets for LCP and CLS
'largest-contentful-paint': ['error', { maxNumericValue: 2500 }], // LCP <= 2.5s (Good threshold)
'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }], // CLS <= 0.1 (Good threshold)
},
},
upload: {
target: 'temporary-public-storage', // Uploads auditable HTML reports for triage
},
},
};
17 changes: 17 additions & 0 deletions tests/accessibility.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';

test.describe('Accessibility Quality Gate Matrix', () => {
test('should pass standard automated a11y checking algorithms without strict violations', async ({ page }) => {
// Navigate to a critical landing view route
await page.goto('/');

// Scan page elements using WCAG 2.1 AA benchmarks
const accessibilityScanResults = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa'])
.analyze();

// Task Requirement: Verify zero violations to avoid regression failures
expect(accessibilityScanResults.violations).toEqual([]);
});
});