# 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: vrs.spec.js >> Vehicle Requisition — HTML Structure >> all screens present
- Location: tests/vrs.spec.js:39:3

# Error details

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

Expected substring: "id=\"screen-splash\""
Received string:    "404 page not found
"
```

# Test source

```ts
  1  | // vrs.spec.js — Vehicle Requisition PWA
  2  | const { test, expect, devices, request } = require('@playwright/test');
  3  | 
  4  | const PWA_NAME = 'Vehicle Requisition';
  5  | const BASE_URL = 'https://srv1111289.hstgr.cloud/vrs/';
  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('/vrs/')).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('sw.js is present', async ({ page }) => {
  23 |     const resp = await page.goto(BASE_URL + 'sw.js');
  24 |     const text = await resp?.text() || '';
  25 |     expect(text).toContain('vrs-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('all screens present', () => {
> 40 |     expect(html).toContain('id="screen-splash"');
     |                  ^ Error: expect(received).toContain(expected) // indexOf
  41 |     expect(html).toContain('id="screen-login"');
  42 |     expect(html).toContain('id="screen-mine"');
  43 |     expect(html).toContain('id="screen-approvals"');
  44 |     expect(html).toContain('id="screen-all"');
  45 |   });
  46 | 
  47 |   test('hub navigation present on all screens', () => {
  48 |     expect(html).toContain('href="/hub/"');
  49 |     expect(html).toContain('🏠');
  50 |   });
  51 | });
  52 | 
```