# 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/entity-graph.spec.ts >> entity-graph pop-over >> opens and draws on /committees/a75a9110-f1db-a945-39a8-7503ed3c04da/
- Location: tests/ui/entity-graph.spec.ts:62:9

# Error details

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

```
Error: expect(locator).toBeVisible() failed

Locator: locator('dialog.eg-dialog').locator('.eg-canvas canvas').first()
Expected: visible
Error: element(s) not found

Call log:
  - Expect "toBeVisible" locator('dialog.eg-dialog').locator('.eg-canvas canvas').first() with timeout 60000ms
  - waiting for locator('dialog.eg-dialog').locator('.eg-canvas canvas').first()
  - Test timeout of 30000ms exceeded.

```

```yaml
- banner:
  - heading "DNC SERVICES CORP / DEMOCRATIC NATIONAL COMMITTEE" [level=1]
  - paragraph: Party - Qualified
  - paragraph: "FEC ID: C00010603"
  - button "Graph"
- link "Log In":
  - /url: /outpost.goauthentik.io/start?rd=http%3A%2F%2Fpreview-us-elect-info.electinfo.svc.cluster.local%2Fcommittees%2Fa75a9110-f1db-a945-39a8-7503ed3c04da%2F
- heading "Overview" [level=2]
- term: Committee Type
- definition: Party - Qualified
- term: Designation
- definition: U
- term: Party Affiliation
- definition:
  - link "Democratic Party":
    - /url: https://preview.elect.info/parties/democratic/
- term: Treasurer
- definition: MCGREGOR, VIRGINIA
- term: Location
- definition:
  - text: WASHINGTON,
  - link "District of Columbia":
    - /url: https://preview.elect.info/states/district-of-columbia/
  - text: "20003"
- term: Active Cycles
- definition:
  - link "2026":
    - /url: https://preview.elect.info/elections/2026/
  - text: ","
  - link "2024":
    - /url: https://preview.elect.info/elections/2024/
  - text: ","
  - link "2022":
    - /url: https://preview.elect.info/elections/2022/
  - text: ","
  - link "2020":
    - /url: https://preview.elect.info/elections/2020/
  - text: ","
  - link "2018":
    - /url: https://preview.elect.info/elections/2018/
  - text: ","
  - link "2016":
    - /url: https://preview.elect.info/elections/2016/
  - text: ","
  - link "2014":
    - /url: https://preview.elect.info/elections/2014/
  - text: ","
  - link "2012":
    - /url: https://preview.elect.info/elections/2012/
  - text: ","
  - link "2010":
    - /url: https://preview.elect.info/elections/2010/
  - text: ","
  - link "2008":
    - /url: https://preview.elect.info/elections/2008/
  - text: ","
  - link "2006":
    - /url: https://preview.elect.info/elections/2006/
  - text: ","
  - link "2004":
    - /url: https://preview.elect.info/elections/2004/
  - text: ","
  - link "2002":
    - /url: https://preview.elect.info/elections/2002/
  - text: ","
  - link "2000":
    - /url: https://preview.elect.info/elections/2000/
  - text: ","
  - link "1998":
    - /url: https://preview.elect.info/elections/1998/
  - text: ","
  - link "1996":
    - /url: https://preview.elect.info/elections/1996/
  - text: ","
  - link "1994":
    - /url: https://preview.elect.info/elections/1994/
  - text: ","
  - link "1992":
    - /url: https://preview.elect.info/elections/1992/
  - text: ","
  - link "1990":
    - /url: https://preview.elect.info/elections/1990/
  - text: ","
  - link "1988":
    - /url: https://preview.elect.info/elections/1988/
  - text: ","
  - link "1986":
    - /url: https://preview.elect.info/elections/1986/
  - text: ","
  - link "1984":
    - /url: https://preview.elect.info/elections/1984/
  - text: ","
  - link "1982":
    - /url: https://preview.elect.info/elections/1982/
  - text: ","
  - link "1980":
    - /url: https://preview.elect.info/elections/1980/
- term: Party Affinity
- definition:
  - link "Democratic Party":
    - /url: https://preview.elect.info/parties/democratic/
  - text: ": 81%"
  - link "Republican Party":
    - /url: https://preview.elect.info/parties/republican/
  - text: ": 19%"
- heading "Financial Summary" [level=2]
- term: Total Receipts
- definition:
  - strong: $4505.2M
- term: Total Disbursements
- definition: $4489.7M
- heading "Connected Organizations" [level=2]
- term: Connected Organization
- definition: DEMOCRATIC GRASSROOTS VICTORY FUND
- heading "Candidates Funded" [level=2]
- paragraph: "Candidates receiving contributions from this committee:"
- list:
  - listitem:
    - link "BIDEN, JOSEPH R JR":
      - /url: https://preview.elect.info/candidates/joseph-r-jr-biden-p80000722/
    - text: $42.6M (374 contributions) [2024, 2020, 2026, 2022]
  - listitem:
    - link "OBAMA, BARACK / JOSEPH R. BIDEN":
      - /url: https://preview.elect.info/candidates/barack-joseph-r-biden-obama-p80003338/
    - text: $28.3M (283 contributions) [2010, 2014, 2012, 2008]
  - listitem:
    - link "CLINTON, HILLARY RODHAM / TIMOTHY MICHAEL KAINE":
      - /url: https://preview.elect.info/candidates/hillary-rodham-timothy-michael-kaine-clinton-p00003392/
    - text: $23.4M (64 contributions) [2016, 2018]
  - listitem:
    - link "CLINTON, WILLIAM JEFFERSON":
      - /url: https://preview.elect.info/candidates/william-jefferson-clinton-p20000642/
    - text: $20.8M (826 contributions) [1996, 1994, 1992, 1998]
  - listitem:
    - link "KERRY, JOHN F":
      - /url: https://preview.elect.info/candidates/john-f-kerry-p80000235/
    - text: $16.6M (567 contributions) [2006, 2004]
  - listitem:
    - link "GORE, AL":
      - /url: https://preview.elect.info/candidates/al-gore-p80000912/
    - text: $13.9M (419 contributions) [2002, 2000]
  - listitem:
    - link "DUKAKIS, MICHAEL S":
      - /url: https://preview.elect.info/candidates/michael-s-dukakis-p80000789/
    - text: $8.0M (117 contributions) [1990, 1992, 1988]
  - listitem:
    - link "CARTER, JIMMY":
      - /url: https://preview.elect.info/candidates/jimmy-carter-p60000247/
    - text: $4.3M (999 contributions) [1990, 1984, 1988, 1980, 1986, 1982]
  - listitem:
    - link "HARRIS, KAMALA":
      - /url: https://preview.elect.info/candidates/kamala-harris-p00009423/
    - text: $3.8M (39 contributions) [2024, 2026]
  - listitem:
    - link "MONDALE, WALTER F":
      - /url: https://preview.elect.info/candidates/walter-f-mondale-p40000267/
    - text: $3.5M (206 contributions) [1984, 1986]
  - listitem:
    - link "BRAUN, CAROL MOSELEY":
      - /url: https://preview.elect.info/candidates/carol-moseley-braun-s2il00028/
    - text: $1.0M (116 contributions) [1996, 1994, 1992, 1998]
  - listitem:
    - link "COLES, MICHAEL J":
      - /url: https://preview.elect.info/candidates/michael-j-coles-s8ga00099/
    - text: $401K (7 contributions) [1998]
  - listitem:
    - link "JONES, DOUG":
      - /url: https://preview.elect.info/candidates/doug-jones-s0al00156/
    - text: $248K (19 contributions) [2018]
  - listitem:
    - link "MARKEY, EDWARD SEN.":
      - /url: https://preview.elect.info/candidates/edward-markey-s4ma00028/
    - text: $172K (7 contributions) [2014]
  - listitem:
    - link "GUNTER, BILL":
      - /url: https://preview.elect.info/candidates/bill-gunter-s4fl00025/
    - text: $111K (3 contributions) [1980]
  - listitem:
    - link "COAKLEY, MARTHA":
      - /url: https://preview.elect.info/candidates/martha-coakley-s0ma00075/
    - text: $84K (73 contributions) [2010]
  - listitem:
    - link "LAMM, DOROTHY V":
      - /url: https://preview.elect.info/candidates/dorothy-v-lamm-s8co00107/
    - text: $80K (2 contributions) [1998]
  - listitem:
    - link "WOFFORD, HARRIS L":
      - /url: https://preview.elect.info/candidates/harris-l-wofford-s2pa00083/
    - text: $76K (3 contributions) [1992]
  - listitem:
    - link "BIDEN, JR., JOSEPH R.":
      - /url: https://preview.elect.info/candidates/jr-joseph-r-biden-p60012465/
    - text: $61K (2 contributions) [2024]
  - listitem:
    - link "BENNET, MICHAEL F.":
      - /url: https://preview.elect.info/candidates/michael-f-bennet-s0co00211/
    - text: $57K (4 contributions) [2010]
- paragraph: Showing top 20 of 439
- heading "Independent Expenditures For" [level=2]
- paragraph: "Candidates this committee spent for, independently of their campaigns (not contributions to the campaigns):"
- list:
  - listitem:
    - link "KERRY, JOHN F":
      - /url: https://preview.elect.info/candidates/john-f-kerry-p80000235/
    - text: $33.2M (93 expenditures) [2004]
  - listitem:
    - link "MURPHY, SCOTT M":
      - /url: https://preview.elect.info/candidates/scott-m-murphy-h0ny20079/
    - text: $10K (1 expenditures) [2010]
  - listitem:
    - link "BALDWIN, TAMMY":
      - /url: https://preview.elect.info/candidates/tammy-baldwin-h8wi00018/
    - text: $913 (3 expenditures) [2010]
  - listitem:
    - link "GIANNOULIAS, ALEXANDER":
      - /url: https://preview.elect.info/candidates/alexander-giannoulias-s0il00204/
    - text: $913 (3 expenditures) [2010]
  - listitem:
    - link "FRANKEN, AL":
      - /url: https://preview.elect.info/candidates/al-franken-s8mn00438/
    - text: $913 (3 expenditures) [2010]
  - listitem:
    - link "BUSH, GEORGE W":
      - /url: https://preview.elect.info/candidates/george-w-bush-p00003335/
    - text: $0 (1 expenditures) [2006]
- paragraph: Showing all 6
- heading "Independent Expenditures Against" [level=2]
- paragraph: "Candidates this committee spent against, independently of their campaigns:"
- list:
  - listitem:
    - link "BUSH, GEORGE W":
      - /url: https://preview.elect.info/candidates/george-w-bush-p00003335/
    - text: $87.2M (89 expenditures) [2004]
  - listitem:
    - link "MCCAIN, JOHN S.":
      - /url: https://preview.elect.info/candidates/john-s-mccain-p80002801/
    - text: $1.1M (10 expenditures) [2010, 2008]
  - listitem:
    - link "DEMINT, JAMES W":
      - /url: https://preview.elect.info/candidates/james-w-demint-s4sc00083/
    - text: $913 (3 expenditures) [2010]
  - listitem:
    - link "O'DONNELL, CHRISTINE":
      - /url: https://preview.elect.info/candidates/christine-odonnell-s6de00131/
    - text: $913 (3 expenditures) [2010]
  - listitem:
    - link "KERRY, JOHN F":
      - /url: https://preview.elect.info/candidates/john-f-kerry-p80000235/
    - text: $0 (1 expenditures) [2006]
- paragraph: Showing all 5
- heading "Committees Funded" [level=2]
- paragraph: "Committees receiving transfers from this committee:"
- list:
  - listitem:
    - link "HARRIS VICTORY FUND":
      - /url: https://preview.elect.info/committees/harris-victory-fund-c00744946/
    - text: $333.7M (83 transfers)
  - listitem:
    - link "OBAMA VICTORY FUND 2012":
      - /url: https://preview.elect.info/committees/obama-victory-fund-2012-c00494740/
    - text: $126.5M (44 transfers)
  - listitem:
    - link "HILLARY VICTORY FUND":
      - /url: https://preview.elect.info/committees/hillary-victory-fund-c00586537/
    - text: $108.3M (43 transfers)
  - listitem:
    - link "PENNSYLVANIA DEMOCRATIC PARTY":
      - /url: https://preview.elect.info/committees/pennsylvania-democratic-party-c00167130/
    - text: $97.6M (1,290 transfers)
  - listitem:
    - link "DEMOCRATIC EXECUTIVE COMMITTEE OF FLORIDA":
      - /url: https://preview.elect.info/committees/democratic-executive-committee-of-florida-c00005561/
    - text: $83.6M (1,221 transfers)
  - listitem:
    - link "OBAMA VICTORY FUND":
      - /url: https://preview.elect.info/committees/obama-victory-fund-c00451393/
    - text: $70.3M (22 transfers)
  - listitem:
    - link "DCCC":
      - /url: https://preview.elect.info/committees/dccc-c00000935/
    - text: $70.1M (373 transfers)
  - listitem:
    - link "OHIO DEMOCRATIC PARTY - FEDERAL":
      - /url: https://preview.elect.info/committees/ohio-democratic-party-federal-c00016899/
    - text: $68.0M (1,236 transfers)
  - listitem:
    - link "MICHIGAN DEMOCRATIC STATE CENTRAL COMMITTEE":
      - /url: https://preview.elect.info/committees/michigan-democratic-state-central-committee-c00031054/
    - text: $64.2M (1,190 transfers)
  - listitem:
    - link "DSCC":
      - /url: https://preview.elect.info/committees/dscc-c00042366/
    - text: $63.3M (160 transfers)
  - listitem:
    - link "NORTH CAROLINA DEMOCRATIC PARTY - FEDERAL":
      - /url: https://preview.elect.info/committees/north-carolina-democratic-party-federal-c00165688/
    - text: $56.1M (991 transfers)
  - listitem:
    - link "HARRIS ACTION FUND":
      - /url: https://preview.elect.info/committees/harris-action-fund-c00838912/
    - text: $51.9M (14 transfers)
  - listitem:
    - link "DEMOCRATIC PARTY OF WISCONSIN FEDERAL":
      - /url: https://preview.elect.info/committees/democratic-party-of-wisconsin-federal-c00019331/
    - text: $48.8M (1,151 transfers)
  - listitem:
    - link "DEMOCRATIC PARTY OF VIRGINIA":
      - /url: https://preview.elect.info/committees/democratic-party-of-virginia-c00155952/
    - text: $47.4M (1,037 transfers)
  - listitem:
    - link "BIDEN ACTION FUND":
      - /url: https://preview.elect.info/committees/biden-action-fund-c00746651/
    - text: $46.5M (21 transfers)
  - listitem:
    - link "DEMOCRATIC GRASSROOTS VICTORY FUND":
      - /url: https://preview.elect.info/committees/democratic-grassroots-victory-fund-c00658476/
    - text: $42.9M (103 transfers)
  - listitem:
    - link "NEVADA STATE DEMOCRATIC PARTY":
      - /url: https://preview.elect.info/committees/nevada-state-democratic-party-c00208991/
    - text: $40.3M (1,344 transfers)
  - listitem:
    - link "HILLARY ACTION FUND":
      - /url: https://preview.elect.info/committees/hillary-action-fund-c00619411/
    - text: $39.5M (47 transfers)
  - listitem:
    - link "GEORGIA FEDERAL ELECTIONS COMMITTEE":
      - /url: https://preview.elect.info/committees/georgia-federal-elections-committee-c00041269/
    - text: $34.9M (891 transfers)
  - listitem:
    - 'link "FEDERAL: COLORADO DEMOCRATIC PARTY"':
      - /url: https://preview.elect.info/committees/federal-colorado-democratic-party-c00161786/
    - text: $34.5M (993 transfers)
- paragraph: Showing top 20 of 1,646
- heading "Funded By" [level=2]
- paragraph: "Committees that have transferred funds to this committee:"
- list:
  - listitem:
    - link "HARRIS VICTORY FUND":
      - /url: https://preview.elect.info/committees/harris-victory-fund-c00744946/
    - text: $349.3M (108 transfers)
  - listitem:
    - link "OBAMA VICTORY FUND 2012":
      - /url: https://preview.elect.info/committees/obama-victory-fund-2012-c00494740/
    - text: $103.7M (41 transfers)
  - listitem:
    - link "PENNSYLVANIA DEMOCRATIC PARTY":
      - /url: https://preview.elect.info/committees/pennsylvania-democratic-party-c00167130/
    - text: $97.1M (1,457 transfers)
  - listitem:
    - link "DEMOCRATIC EXECUTIVE COMMITTEE OF FLORIDA":
      - /url: https://preview.elect.info/committees/democratic-executive-committee-of-florida-c00005561/
    - text: $77.6M (1,346 transfers)
  - listitem:
    - link "HILLARY VICTORY FUND":
      - /url: https://preview.elect.info/committees/hillary-victory-fund-c00586537/
    - text: $77.4M (49 transfers)
  - listitem:
    - link "DEMOCRATIC PARTY OF VIRGINIA":
      - /url: https://preview.elect.info/committees/democratic-party-of-virginia-c00155952/
    - text: $71.8M (1,195 transfers)
  - listitem:
    - link "OBAMA VICTORY FUND":
      - /url: https://preview.elect.info/committees/obama-victory-fund-c00451393/
    - text: $70.3M (22 transfers)
  - listitem:
    - link "OHIO DEMOCRATIC PARTY - FEDERAL":
      - /url: https://preview.elect.info/committees/ohio-democratic-party-federal-c00016899/
    - text: $69.8M (1,288 transfers)
  - listitem:
    - link "DCCC":
      - /url: https://preview.elect.info/committees/dccc-c00000935/
    - text: $68.4M (134 transfers)
  - listitem:
    - link "DSCC":
      - /url: https://preview.elect.info/committees/dscc-c00042366/
    - text: $65.7M (161 transfers)
  - listitem:
    - link "MICHIGAN DEMOCRATIC STATE CENTRAL COMMITTEE":
      - /url: https://preview.elect.info/committees/michigan-democratic-state-central-committee-c00031054/
    - text: $63.4M (1,272 transfers)
  - listitem:
    - link "NORTH CAROLINA DEMOCRATIC PARTY - FEDERAL":
      - /url: https://preview.elect.info/committees/north-carolina-democratic-party-federal-c00165688/
    - text: $56.2M (1,221 transfers)
  - listitem:
    - link "HARRIS ACTION FUND":
      - /url: https://preview.elect.info/committees/harris-action-fund-c00838912/
    - text: $51.4M (13 transfers)
  - listitem:
    - link "DEMOCRATIC PARTY OF WISCONSIN FEDERAL":
      - /url: https://preview.elect.info/committees/democratic-party-of-wisconsin-federal-c00019331/
    - text: $50.6M (1,272 transfers)
  - listitem:
    - link "BIDEN ACTION FUND":
      - /url: https://preview.elect.info/committees/biden-action-fund-c00746651/
    - text: $46.5M (23 transfers)
  - listitem:
    - link "NEVADA STATE DEMOCRATIC PARTY":
      - /url: https://preview.elect.info/committees/nevada-state-democratic-party-c00208991/
    - text: $37.8M (1,072 transfers)
  - listitem:
    - link "GEORGIA FEDERAL ELECTIONS COMMITTEE":
      - /url: https://preview.elect.info/committees/georgia-federal-elections-committee-c00041269/
    - text: $36.9M (1,050 transfers)
  - listitem:
    - 'link "FEDERAL: COLORADO DEMOCRATIC PARTY"':
      - /url: https://preview.elect.info/committees/federal-colorado-democratic-party-c00161786/
    - text: $35.0M (1,046 transfers)
  - listitem:
    - link "DEMOCRATIC GRASSROOTS VICTORY FUND":
      - /url: https://preview.elect.info/committees/democratic-grassroots-victory-fund-c00658476/
    - text: $32.4M (74 transfers)
  - listitem:
    - link "IOWA DEMOCRATIC PARTY":
      - /url: https://preview.elect.info/committees/iowa-democratic-party-c00035600/
    - text: $31.4M (1,214 transfers)
- paragraph: Showing top 20 of 2,261
- contentinfo:
  - paragraph:
    - link "elect.info":
      - /url: https://preview.elect.info/
    - text: "| Data from"
    - link "Federal Election Commission":
      - /url: https://preview.elect.info/datasources/fec_bulk/
    - text: "| Generated 2026-10-13"
- 'dialog "DNC SERVICES CORP / DEMOCRATIC NATIONAL COMMITTEE: graph of connected entities"':
  - heading "DNC SERVICES CORP / DEMOCRATIC NATIONAL COMMITTEE — connected entities" [level=2]
  - button "Fit"
  - button "Close graph": Close
  - img "Network graph of DNC SERVICES CORP / DEMOCRATIC NATIONAL COMMITTEE and its most significant connections": The graph could not be loaded. Please try again later.
  - text: Committee Candidate Vendor Party State / place Office Cycle Committees and candidates are tinted by party
```

# Test source

```ts
  1  | import { test, expect } from '@playwright/test';
  2  | 
  3  | // Entity graph pop-over (electinfo/sites#249). nginx injects /js/entity-graph.js
  4  | // next to money-flow.js on Candidate and Committee detail pages. The script
  5  | // adds a "Graph" button to the header; opening it fetches entityGraph from
  6  | // /api/graphql, loads /js/entity-graph-view.js (Cytoscape) and draws the node
  7  | // and its most significant neighbours in a modal dialog.
  8  | //
  9  | // Same targets and pages as money-flow.spec.ts.
  10 | 
  11 | const SCRIPT = '<script src="/js/entity-graph.js" defer></script>';
  12 | const DNC = '/committees/a75a9110-f1db-a945-39a8-7503ed3c04da/'; // C00010603
  13 | const HARRIS = '/candidates/a8897257-430c-2bf3-4498-349021b09ca3/'; // P00009423
  14 | const OTHER_PAGES = [
  15 |   '/states/032f8d61-f554-f435-2a6d-50b3c8cc01d7/', // AK
  16 |   '/elections/2024/',
  17 |   '/offices/president/',
  18 | ];
  19 | 
  20 | test.describe('entity-graph script injection', () => {
  21 |   for (const path of [DNC, HARRIS]) {
  22 |     test(`injected once on ${path}`, async ({ request }) => {
  23 |       const res = await request.get(path);
  24 |       expect(res.status()).toBe(200);
  25 |       expect((await res.text()).split(SCRIPT).length - 1).toBe(1);
  26 |     });
  27 |   }
  28 | 
  29 |   for (const path of OTHER_PAGES) {
  30 |     test(`not injected on ${path}`, async ({ request }) => {
  31 |       const res = await request.get(path);
  32 |       expect(res.status()).toBe(200);
  33 |       expect(await res.text()).not.toContain('entity-graph.js');
  34 |     });
  35 |   }
  36 | });
  37 | 
  38 | test.describe('entityGraph API', () => {
  39 |   for (const fecId of ['C00010603', 'P00009423']) {
  40 |     test(`${fecId}: neighbours without individuals, money edges with amounts`, async ({ request }) => {
  41 |       const res = await request.post('/api/graphql', {
  42 |         data: {
  43 |           query: 'query($f: String!) { entityGraph(fecId: $f) { focalId nodes { id label labels focal displayName } edges { type amount } } }',
  44 |           variables: { f: fecId },
  45 |         },
  46 |         timeout: 60000,
  47 |       });
  48 |       expect(res.status()).toBe(200);
  49 |       const g = (await res.json())?.data?.entityGraph;
  50 |       expect(g).toBeTruthy();
  51 |       expect(g.nodes.filter((n: { focal: boolean }) => n.focal)).toHaveLength(1);
  52 |       expect(g.nodes.length).toBeGreaterThan(5);
  53 |       expect(g.nodes.some((n: { labels: string[] }) => n.labels.includes('Individual'))).toBe(false);
  54 |       expect(g.nodes.every((n: { displayName: string }) => !!n.displayName)).toBe(true);
  55 |       expect(g.edges.some((e: { amount: number | null }) => e.amount != null && e.amount > 0)).toBe(true);
  56 |     });
  57 |   }
  58 | });
  59 | 
  60 | test.describe('entity-graph pop-over', () => {
  61 |   for (const path of [DNC, HARRIS]) {
  62 |     test(`opens and draws on ${path}`, async ({ page }) => {
  63 |       const errors: string[] = [];
  64 |       page.on('pageerror', (e) => errors.push(String(e)));
  65 |       await page.goto(path);
  66 |       const button = page.locator('button.eg-open');
  67 |       await expect(button).toHaveCount(1, { timeout: 15000 });
  68 |       await button.click();
  69 |       const dialog = page.locator('dialog.eg-dialog');
  70 |       await expect(dialog).toBeVisible();
> 71 |       await expect(dialog.locator('.eg-canvas canvas').first()).toBeVisible({ timeout: 60000 });
     |                                                                 ^ Error: expect(locator).toBeVisible() failed
  72 |       // centred in the viewport, horizontally and vertically
  73 |       const box = (await dialog.boundingBox())!;
  74 |       const vp = page.viewportSize()!;
  75 |       expect(Math.abs(box.x - (vp.width - box.x - box.width))).toBeLessThanOrEqual(2);
  76 |       expect(Math.abs(box.y - (vp.height - box.y - box.height))).toBeLessThanOrEqual(2);
  77 |       await page.keyboard.press('Escape');
  78 |       await expect(dialog).toBeHidden();
  79 |       expect(errors).toEqual([]);
  80 |     });
  81 |   }
  82 | });
  83 | 
```