test(routePlanner): replace global fetch mocks with MSW - #684
Merged
Aditya8369 merged 2 commits intoAug 12, 2026
Annotations
10 errors, 1 warning, and 1 notice
|
Run Playwright tests (firefox):
e2e/specs/app-load.spec.js#L150
5) [firefox] › e2e/specs/app-load.spec.js:148:3 › Theme toggle › theme toggle button is always visible
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(locator).toBeVisible() failed
Locator: locator('button[aria-label="Toggle Theme"]')
Expected: visible
Timeout: 8000ms
Error: element(s) not found
Call log:
- Expect "toBeVisible" with timeout 8000ms
- waiting for locator('button[aria-label="Toggle Theme"]')
148 | test('theme toggle button is always visible', async ({ mockPage }) => {
149 | const themeToggle = mockPage.locator('button[aria-label="Toggle Theme"]');
> 150 | await expect(themeToggle).toBeVisible();
| ^
151 | await expect(themeToggle).toBeEnabled();
152 | });
153 | });
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/app-load.spec.js:150:31
|
|
Run Playwright tests (firefox):
e2e/specs/app-load.spec.js#L150
5) [firefox] › e2e/specs/app-load.spec.js:148:3 › Theme toggle › theme toggle button is always visible
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(locator).toBeVisible() failed
Locator: locator('button[aria-label="Toggle Theme"]')
Expected: visible
Timeout: 8000ms
Error: element(s) not found
Call log:
- Expect "toBeVisible" with timeout 8000ms
- waiting for locator('button[aria-label="Toggle Theme"]')
148 | test('theme toggle button is always visible', async ({ mockPage }) => {
149 | const themeToggle = mockPage.locator('button[aria-label="Toggle Theme"]');
> 150 | await expect(themeToggle).toBeVisible();
| ^
151 | await expect(themeToggle).toBeEnabled();
152 | });
153 | });
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/app-load.spec.js:150:31
|
|
Run Playwright tests (firefox):
e2e/specs/accessibility.spec.js#L53
4) [firefox] › e2e/specs/accessibility.spec.js:51:3 › Interactive element labels › theme toggle button has an aria-label
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(locator).toBeVisible() failed
Locator: locator('button[aria-label="Toggle Theme"]')
Expected: visible
Timeout: 8000ms
Error: element(s) not found
Call log:
- Expect "toBeVisible" with timeout 8000ms
- waiting for locator('button[aria-label="Toggle Theme"]')
51 | test('theme toggle button has an aria-label', async ({ mockPage }) => {
52 | const btn = mockPage.locator('button[aria-label="Toggle Theme"]');
> 53 | await expect(btn).toBeVisible();
| ^
54 | });
55 |
56 | test('navigation buttons have visible text labels', async ({ mockPage }) => {
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/accessibility.spec.js:53:23
|
|
Run Playwright tests (firefox):
e2e/specs/accessibility.spec.js#L53
4) [firefox] › e2e/specs/accessibility.spec.js:51:3 › Interactive element labels › theme toggle button has an aria-label
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(locator).toBeVisible() failed
Locator: locator('button[aria-label="Toggle Theme"]')
Expected: visible
Timeout: 8000ms
Error: element(s) not found
Call log:
- Expect "toBeVisible" with timeout 8000ms
- waiting for locator('button[aria-label="Toggle Theme"]')
51 | test('theme toggle button has an aria-label', async ({ mockPage }) => {
52 | const btn = mockPage.locator('button[aria-label="Toggle Theme"]');
> 53 | await expect(btn).toBeVisible();
| ^
54 | });
55 |
56 | test('navigation buttons have visible text labels', async ({ mockPage }) => {
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/accessibility.spec.js:53:23
|
|
Run Playwright tests (firefox):
e2e/specs/app-load.spec.js#L138
3) [firefox] › e2e/specs/app-load.spec.js:136:3 › Theme toggle › toggles between light and dark themes
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(locator).toBeVisible() failed
Locator: locator('button[aria-label="Toggle Theme"]')
Expected: visible
Timeout: 8000ms
Error: element(s) not found
Call log:
- Expect "toBeVisible" with timeout 8000ms
- waiting for locator('button[aria-label="Toggle Theme"]')
136 | test('toggles between light and dark themes', async ({ mockPage }) => {
137 | const themeToggle = mockPage.locator('button[aria-label="Toggle Theme"]');
> 138 | await expect(themeToggle).toBeVisible();
| ^
139 | const html = mockPage.locator('html');
140 | // Wait up to 5s for the useEffect to apply initial theme attribute
141 | await expect(html).toHaveAttribute('data-theme', 'light', { timeout: 5_000 });
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/app-load.spec.js:138:31
|
|
Run Playwright tests (firefox):
e2e/specs/app-load.spec.js#L138
3) [firefox] › e2e/specs/app-load.spec.js:136:3 › Theme toggle › toggles between light and dark themes
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(locator).toBeVisible() failed
Locator: locator('button[aria-label="Toggle Theme"]')
Expected: visible
Timeout: 8000ms
Error: element(s) not found
Call log:
- Expect "toBeVisible" with timeout 8000ms
- waiting for locator('button[aria-label="Toggle Theme"]')
136 | test('toggles between light and dark themes', async ({ mockPage }) => {
137 | const themeToggle = mockPage.locator('button[aria-label="Toggle Theme"]');
> 138 | await expect(themeToggle).toBeVisible();
| ^
139 | const html = mockPage.locator('html');
140 | // Wait up to 5s for the useEffect to apply initial theme attribute
141 | await expect(html).toHaveAttribute('data-theme', 'light', { timeout: 5_000 });
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/app-load.spec.js:138:31
|
|
Run Playwright tests (firefox):
e2e/specs/accessibility.spec.js#L38
2) [firefox] › e2e/specs/accessibility.spec.js:36:3 › Heading hierarchy › page has exactly one <h1>
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toBe(expected) // Object.is equality
Expected: 1
Received: 2
36 | test('page has exactly one <h1>', async ({ mockPage }) => {
37 | const h1s = mockPage.locator('h1');
> 38 | expect(await h1s.count()).toBe(1);
| ^
39 | });
40 |
41 | test('<h1> contains meaningful text', async ({ mockPage }) => {
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/accessibility.spec.js:38:31
|
|
Run Playwright tests (firefox):
e2e/specs/accessibility.spec.js#L38
2) [firefox] › e2e/specs/accessibility.spec.js:36:3 › Heading hierarchy › page has exactly one <h1>
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toBe(expected) // Object.is equality
Expected: 1
Received: 2
36 | test('page has exactly one <h1>', async ({ mockPage }) => {
37 | const h1s = mockPage.locator('h1');
> 38 | expect(await h1s.count()).toBe(1);
| ^
39 | });
40 |
41 | test('<h1> contains meaningful text', async ({ mockPage }) => {
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/accessibility.spec.js:38:31
|
|
Run Playwright tests (firefox):
e2e/specs/accessibility.spec.js#L29
1) [firefox] › e2e/specs/accessibility.spec.js:28:3 › Landmark structure › page has a <footer> element
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(locator).toBeVisible() failed
Locator: locator('footer')
Expected: visible
Error: strict mode violation: locator('footer') resolved to 3 elements:
1) <footer class="_siteFooter_1ahwo_1">…</footer> aka locator('footer').filter({ hasText: 'Pollution Control HubMonitor' })
2) <footer>…</footer> aka getByText('++ + © 2023 My Website. All')
...
Call log:
- Expect "toBeVisible" with timeout 8000ms
- waiting for locator('footer')
27 |
28 | test('page has a <footer> element', async ({ mockPage }) => {
> 29 | await expect(mockPage.locator('footer')).toBeVisible({ timeout: 8_000 });
| ^
30 | });
31 | });
32 |
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/accessibility.spec.js:29:46
|
|
Run Playwright tests (firefox):
e2e/specs/accessibility.spec.js#L29
1) [firefox] › e2e/specs/accessibility.spec.js:28:3 › Landmark structure › page has a <footer> element
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(locator).toBeVisible() failed
Locator: locator('footer')
Expected: visible
Error: strict mode violation: locator('footer') resolved to 3 elements:
1) <footer class="_siteFooter_1ahwo_1">…</footer> aka locator('footer').filter({ hasText: 'Pollution Control HubMonitor' })
2) <footer>…</footer> aka getByText('++ + © 2023 My Website. All')
...
Call log:
- Expect "toBeVisible" with timeout 8000ms
- waiting for locator('footer')
27 |
28 | test('page has a <footer> element', async ({ mockPage }) => {
> 29 | await expect(mockPage.locator('footer')).toBeVisible({ timeout: 8_000 });
| ^
30 | });
31 | });
32 |
at /home/runner/work/Pollution-Control-Hub/Pollution-Control-Hub/e2e/specs/accessibility.spec.js:29:46
|
|
Complete job
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-node@v4, actions/upload-artifact@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Run Playwright tests (firefox)
20 failed
[firefox] › e2e/specs/accessibility.spec.js:28:3 › Landmark structure › page has a <footer> element
[firefox] › e2e/specs/accessibility.spec.js:36:3 › Heading hierarchy › page has exactly one <h1>
[firefox] › e2e/specs/accessibility.spec.js:51:3 › Interactive element labels › theme toggle button has an aria-label
[firefox] › e2e/specs/accessibility.spec.js:146:3 › Dark mode structural correctness › dark theme applies data-theme="dark" to <html>
[firefox] › e2e/specs/accessibility.spec.js:151:3 › Dark mode structural correctness › main content is still visible in dark mode
[firefox] › e2e/specs/accessibility.spec.js:198:3 › axe-core WCAG 2.1 AA compliance › homepage has no critical or serious accessibility violations
[firefox] › e2e/specs/accessibility.spec.js:210:3 › axe-core WCAG 2.1 AA compliance › dashboard passes automated accessibility audit
[firefox] › e2e/specs/accessibility.spec.js:224:3 › axe-core WCAG 2.1 AA compliance › location map is accessible
[firefox] › e2e/specs/accessibility.spec.js:242:3 › axe-core WCAG 2.1 AA compliance › community hub form has no accessibility violations
[firefox] › e2e/specs/accessibility.spec.js:257:3 › axe-core WCAG 2.1 AA compliance › health advisory panel passes axe-core audit
[firefox] › e2e/specs/accessibility.spec.js:275:3 › axe-core WCAG 2.1 AA compliance › dark mode maintains accessibility compliance
[firefox] › e2e/specs/app-load.spec.js:136:3 › Theme toggle › toggles between light and dark themes
[firefox] › e2e/specs/app-load.spec.js:148:3 › Theme toggle › theme toggle button is always visible
[firefox] › e2e/specs/caching.spec.js:19:3 › localStorage persistence › theme preference is persisted in localStorage
[firefox] › e2e/specs/caching.spec.js:35:3 › State restoration after reload › dark theme is applied on toggle
[firefox] › e2e/specs/caching.spec.js:74:3 › API request deduplication (SWR cache) › navigating between sections does not re-fetch AQI data
[firefox] › e2e/specs/health-alerts.spec.js:102:3 › ScenarioSimulator component › scenario simulator is rendered
[firefox] › e2e/specs/health-alerts.spec.js:107:3 › ScenarioSimulator component › simulator has at least one interactive control
[firefox] › e2e/specs/health-alerts.spec.js:136:3 › Footer › footer is present at the bottom of the page
[firefox] › e2e/specs/health-alerts.spec.js:141:3 › Footer › footer contains attribution or copyright text
3 skipped
75 passed (11.6m)
|
background
wait
wait-all
cancel
parallel
Loading