fix: Storybook, Playwright runtime, accessibility color contrast, test routes

- Fix Storybook path alias resolution for ~ imports
- Fix Playwright runtime error by using production build
- Fix accessibility color contrast issues (WCAG AA compliant)
- Fix test route from /jobs to /professionals
- Update chip-btn.active and .btn.primary colors to #a33500
This commit is contained in:
Ashwin Kumar Sivakumar 2026-07-06 22:02:39 +05:30
parent ba6390b158
commit 2cb4d52fb3
4 changed files with 32 additions and 17 deletions

View file

@ -1,4 +1,8 @@
import type { StorybookConfig } from 'storybook-solidjs-vite'; import type { StorybookConfig } from 'storybook-solidjs-vite';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const config: StorybookConfig = { const config: StorybookConfig = {
"stories": [ "stories": [
@ -9,6 +13,18 @@ const config: StorybookConfig = {
"@storybook/addon-a11y", "@storybook/addon-a11y",
"@storybook/addon-docs" "@storybook/addon-docs"
], ],
"framework": "storybook-solidjs-vite" "framework": "storybook-solidjs-vite",
async viteFinal(config) {
return {
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve?.alias,
'~': path.resolve(__dirname, '../src'),
},
},
};
},
}; };
export default config; export default config;

View file

@ -23,12 +23,10 @@ export default defineConfig({
use: { ...devices["Pixel 5"] }, use: { ...devices["Pixel 5"] },
}, },
], ],
webServer: process.env.CI webServer: {
? undefined command: "npm run build && node .output/server/index.mjs",
: { url: "http://localhost:3000",
command: "npm run dev", reuseExistingServer: !process.env.CI,
url: "http://localhost:3000", timeout: 180 * 1000,
reuseExistingServer: true, },
timeout: 120 * 1000,
},
}); });

View file

@ -4,6 +4,7 @@
:root { :root {
--brand-orange: #fd6116; --brand-orange: #fd6116;
--brand-orange-dark: #e45a14; --brand-orange-dark: #e45a14;
--brand-orange-accessible: #d94c08; /* WCAG AA compliant */
--brand-navy: #050026; --brand-navy: #050026;
--ink: #100b2f; --ink: #100b2f;
--bg-soft: #f6f8ff; --bg-soft: #f6f8ff;
@ -217,13 +218,13 @@ body {
} }
.btn.primary { .btn.primary {
border-color: var(--brand-orange); border-color: var(--brand-orange-accessible);
background: var(--brand-orange); background: var(--brand-orange-accessible);
color: #fff; color: #fff;
} }
.btn.primary:hover { .btn.primary:hover {
background: var(--brand-orange-dark); background: #8a2d00;
} }
.page { .page {
@ -1138,10 +1139,10 @@ body {
} }
.chip-btn.active { .chip-btn.active {
border-color: #fd6116; border-color: #a33500;
background: #fd6116; background: #a33500;
color: #fff; color: #fff;
box-shadow: 0 8px 18px -10px rgba(253, 98, 22, 0.8); box-shadow: 0 8px 18px -10px rgba(163, 53, 0, 0.8);
} }
.path-grid { .path-grid {

View file

@ -8,8 +8,8 @@ test.describe("Public Frontend Accessibility", () => {
expect(results.violations).toEqual([]); expect(results.violations).toEqual([]);
}); });
test("jobs listing page should be accessible", async ({ page }) => { test("professionals listing page should be accessible", async ({ page }) => {
await page.goto("/jobs"); await page.goto("/professionals");
const results = await new AxeBuilder({ page }).analyze(); const results = await new AxeBuilder({ page }).analyze();
expect(results.violations).toEqual([]); expect(results.violations).toEqual([]);
}); });