# 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: tests/ui/us.spec.ts >> us.elect.info >> entity stats display
- Location: tests/ui/us.spec.ts:10:7

# Error details

```
Test timeout of 30000ms exceeded.
```

```
Error: page.goto: net::ERR_ABORTED; maybe frame was detached?
Call log:
  - navigating to "http://10.1.105.75/", waiting until "load"

```

# Test source

```ts
  1  | import { test, expect } from '@playwright/test';
  2  | 
  3  | test.describe('us.elect.info', () => {
  4  |   test('homepage loads with title', async ({ page }) => {
  5  |     await page.goto('/');
  6  |     await expect(page).toHaveTitle(/US Elections/i);
  7  |     await page.screenshot({ path: '/app/test-output/us-homepage.png' });
  8  |   });
  9  | 
  10 |   test('entity stats display', async ({ page }) => {
> 11 |     await page.goto('/');
     |                ^ Error: page.goto: net::ERR_ABORTED; maybe frame was detached?
  12 |     // Wait for stats to load from OpenSearch
  13 |     await expect(page.locator('#count-politicians')).not.toHaveText('-');
  14 |   });
  15 | 
  16 |   test('CSS assets load', async ({ page }) => {
  17 |     const response = await page.goto('/css/style.css');
  18 |     expect(response?.status()).toBe(200);
  19 |   });
  20 | 
  21 |   test('JS assets load', async ({ page }) => {
  22 |     // Check candidate-index.js which is one of the entity-specific search modules
  23 |     const response = await page.goto('/js/candidate-index.js');
  24 |     expect(response?.status()).toBe(200);
  25 |   });
  26 | 
  27 |   test('404 page works', async ({ page }) => {
  28 |     const response = await page.goto('/nonexistent-page');
  29 |     expect(response?.status()).toBe(404);
  30 |   });
  31 | });
  32 | 
```