# 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: learn.spec.js >> Learning Hub — HTML Structure >> team view and courses-soon block present
- Location: tests/learn.spec.js:51:3

# Error details

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

Expected substring: "id=\"view-team\""
Received string:    "404 page not found
"
```

# Test source

```ts
  1  | // learn.spec.js — 360LM Learning Hub PWA
  2  | const { test, expect, devices, request } = require('@playwright/test');
  3  | 
  4  | const PWA_NAME = 'Learning Hub';
  5  | const BASE_URL = 'https://srv1111289.hstgr.cloud/learn/';
  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('/learn/')).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 versioned', async ({ page }) => {
  23 |     const resp = await page.goto(BASE_URL + 'sw.js');
  24 |     const text = await resp?.text() || '';
  25 |     expect(text).toContain('learn-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('app container and catalog view present', () => {
  40 |     expect(html).toContain('id="boot"');
  41 |     expect(html).toContain('id="app"');
  42 |     expect(html).toContain('id="view-catalog"');
  43 |     expect(html).toContain('id="groups-container"');
  44 |   });
  45 | 
  46 |   test('hub navigation button present', () => {
  47 |     expect(html).toContain("window.location.href='/hub/'");
  48 |     expect(html).toContain('🏡 Hub');
  49 |   });
  50 | 
  51 |   test('team view and courses-soon block present', () => {
> 52 |     expect(html).toContain('id="view-team"');
     |                  ^ Error: expect(received).toContain(expected) // indexOf
  53 |     expect(html).toContain('id="courses-soon-block"');
  54 |     expect(html).toContain('Coming Soon');
  55 |   });
  56 | });
  57 | 
```