# 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: oc_admin.spec.js >> OC Admin — HTML Structure >> all screens present
- Location: tests/oc_admin.spec.js:35:3

# Error details

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

Expected substring: "id=\"scr-home\""
Received string:    "404 page not found
"
```

# Test source

```ts
  1  | // oc_admin.spec.js — OC Contact Import PWA
  2  | const { test, expect, devices, request } = require('@playwright/test');
  3  | 
  4  | const PWA_NAME = 'OC Admin';
  5  | const BASE_URL = 'https://srv1111289.hstgr.cloud/oc-admin/';
  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('/oc-admin/')).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 | 
  23 | });
  24 | 
  25 | test.describe(`${PWA_NAME} — HTML Structure`, () => {
  26 |   let html = '';
  27 | 
  28 |   test.beforeAll(async () => {
  29 |     const ctx = await request.newContext();
  30 |     const resp = await ctx.get(BASE_URL);
  31 |     html = await resp.text();
  32 |     await ctx.dispose();
  33 |   });
  34 | 
  35 |   test('all screens present', () => {
> 36 |     expect(html).toContain('id="scr-home"');
     |                  ^ Error: expect(received).toContain(expected) // indexOf
  37 |     expect(html).toContain('id="scr-import"');
  38 |     expect(html).toContain('id="scr-review"');
  39 |     expect(html).toContain('id="scr-results"');
  40 |     expect(html).toContain('id="scr-conflicts"');
  41 |     expect(html).toContain('id="scr-classify"');
  42 |   });
  43 | 
  44 |   test('hub navigation on every screen', () => {
  45 |     expect(html).toContain('goHub()');
  46 |     expect(html).toContain('🏡 Hub');
  47 |   });
  48 | 
  49 |   test('contact import functions present', () => {
  50 |     expect(html).toContain('function goHome(');
  51 |     expect(html).toContain('function goConflicts(');
  52 |   });
  53 | });
  54 | 
```