# Instructions

- Following Playwright test failed.
- Explain why, be concise, respect Playwright best practices.
- Provide a snippet of code with the fix, if possible.

# Test info

- Name: installation.spec.js >> Installation — HTML Structure >> supervisor header has Hub home button
- Location: tests/installation.spec.js:44:3

# Error details

```
Error: expect(received).toContain(expected) // indexOf

Expected substring: "window.location.href='/hub/'"
Received string:    "404 page not found
"
```

# Test source

```ts
  1  | // installation.spec.js — BTL Installation PWA
  2  | const { test, expect, devices, request } = require('@playwright/test');
  3  | 
  4  | const PWA_NAME = 'Installation';
  5  | const BASE_URL = 'https://srv1111289.hstgr.cloud/installation/current/';
  6  | 
  7  | test.use({ ...devices['Pixel 6'] });
  8  | 
  9  | test.describe(`${PWA_NAME} — Smoke`, () => {
  10 |   test('page or hub loads', async ({ page }) => {
  11 |     await page.goto(BASE_URL);
  12 |     await page.waitForTimeout(800);
  13 |     const url = page.url();
  14 |     expect(url.includes('/hub/') || url.includes('/installation/')).toBeTruthy();
  15 |   });
  16 | 
  17 |   test('manifest.json returns 200', async ({ page }) => {
  18 |     const resp = await page.goto(BASE_URL + 'manifest.json');
  19 |     expect(resp?.status()).toBe(200);
  20 |   });
  21 | 
  22 |   test('service-worker.js is present and versioned', async ({ page }) => {
  23 |     const resp = await page.goto(BASE_URL + 'service-worker.js');
  24 |     const text = await resp?.text() || '';
  25 |     expect(text).toContain('btl-install-v');
  26 |   });
  27 | });
  28 | 
  29 | test.describe(`${PWA_NAME} — HTML Structure`, () => {
  30 |   let html = '';
  31 | 
  32 |   test.beforeAll(async () => {
  33 |     const ctx = await request.newContext();
  34 |     const resp = await ctx.get(BASE_URL);
  35 |     html = await resp.text();
  36 |     await ctx.dispose();
  37 |   });
  38 | 
  39 |   test('supervisor header and field header present', () => {
  40 |     expect(html).toContain('id="supHeader"');
  41 |     expect(html).toContain('id="fieldHeader"');
  42 |   });
  43 | 
  44 |   test('supervisor header has Hub home button', () => {
> 45 |     expect(html).toContain("window.location.href='/hub/'");
     |                  ^ Error: expect(received).toContain(expected) // indexOf
  46 |     expect(html).toContain('🏡 Hub');
  47 |   });
  48 | 
  49 |   test('APP.supervisorLogout function present', () => {
  50 |     expect(html).toContain('supervisorLogout');
  51 |   });
  52 | });
  53 | 
```