# 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/district-delegates.spec.ts >> PR delegate district has a current00 canonical and historical98 redirect
- Location: tests/ui/district-delegates.spec.ts:11:7

# Error details

```
Error: PR:98 must redirect rather than retire or retain an old owner

expect(received).toBe(expected) // Object.is equality

Expected: 301
Received: 410
```

# Page snapshot

```yaml
- generic [active] [ref=f1e1]:
  - banner [ref=f1e2]:
    - heading "Puerto Rico At-Large Congressional District" [level=1] [ref=f1e3]
    - paragraph [ref=f1e4]: Congressional District Profile
  - generic [ref=f1e5]:
    - generic [ref=f1e6]:
      - generic [ref=f1e7]: Not signed in
      - generic [ref=f1e9]:
        - link "Log in" [ref=f1e10] [cursor=pointer]:
          - /url: /outpost.goauthentik.io/start?rd=http%3A%2F%2Fpreview-us-elect-info.electinfo.svc.cluster.local%2Fdistricts%2Fpr-00%2F
        - link "Create an account" [ref=f1e11] [cursor=pointer]:
          - /url: /signin/register?rd=http%3A%2F%2Fpreview-us-elect-info.electinfo.svc.cluster.local%2Fdistricts%2Fpr-00%2F
    - toolbar "Member tools" [ref=f1e12]:
      - button "All cycles (Sign in to use the cycle facet)" [disabled] [ref=f1e13] [cursor=pointer]:
        - generic [ref=f1e17]: All cycles
      - button "Graph (Sign in to use Graph)" [disabled] [ref=f1e20] [cursor=pointer]:
        - generic [ref=f1e29]: Graph
  - generic [ref=f1e32]:
    - heading "Overview" [level=2] [ref=f1e33]
    - generic [ref=f1e34]:
      - term [ref=f1e35]: District ID
      - definition [ref=f1e36]: PR-00
      - term [ref=f1e37]: State
      - definition [ref=f1e38]:
        - link "Puerto Rico" [ref=f1e39] [cursor=pointer]:
          - /url: https://preview.elect.info/states/puerto-rico/
      - term [ref=f1e40]: District Number
      - definition [ref=f1e41]: "00"
      - term [ref=f1e42]: Total Candidates
      - definition [ref=f1e43]: "61"
      - term [ref=f1e44]: Election Cycles
      - definition [ref=f1e45]:
        - generic [ref=f1e46]:
          - link "2026" [ref=f1e47] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2026/
          - text: ","
          - link "2024" [ref=f1e48] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2024/
          - text: ","
          - link "2022" [ref=f1e49] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2022/
          - text: ","
          - link "2020" [ref=f1e50] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2020/
          - text: ","
          - link "2018" [ref=f1e51] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2018/
          - text: ","
          - link "2016" [ref=f1e52] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2016/
          - text: ","
          - link "2014" [ref=f1e53] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2014/
          - text: ","
          - link "2012" [ref=f1e54] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2012/
          - text: ","
          - link "2010" [ref=f1e55] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2010/
          - text: ","
          - link "2008" [ref=f1e56] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2008/
          - text: ","
          - link "2006" [ref=f1e57] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2006/
          - text: ","
          - link "2004" [ref=f1e58] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2004/
          - text: ","
          - link "2002" [ref=f1e59] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2002/
          - text: ","
          - link "2000" [ref=f1e60] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2000/
          - text: ","
          - link "1996" [ref=f1e61] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1996/
          - text: ","
          - link "1994" [ref=f1e62] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1994/
          - text: ","
          - link "1992" [ref=f1e63] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1992/
          - text: ","
          - link "1990" [ref=f1e64] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1990/
          - text: ","
          - link "1988" [ref=f1e65] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1988/
          - text: ","
          - link "1986" [ref=f1e66] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1986/
          - text: ","
          - link "1984" [ref=f1e67] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1984/
          - text: ","
          - link "1982" [ref=f1e68] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1982/
          - text: ","
          - link "1980" [ref=f1e69] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1980/
    - paragraph [ref=f1e70]:
      - link "View office details for U.S. Representative - Puerto Rico District 00" [ref=f1e71] [cursor=pointer]:
        - /url: https://preview.elect.info/offices/house/pr-00/
  - generic [ref=f1e72]:
    - heading "Candidates" [level=2] [ref=f1e73]
    - generic [ref=f1e75]:
      - generic [ref=f1e76]:
        - generic [ref=f1e77]:
          - combobox "Search entities" [ref=f1e78]
          - status [ref=f1e79]
        - button "Search" [ref=f1e80] [cursor=pointer]
      - generic [ref=f1e81]:
        - heading "Candidates" [level=3] [ref=f1e83]
        - generic [ref=f1e84]:
          - link "GONZALEZ COLON, JENNIFFER PNP | $435,150" [ref=f1e85] [cursor=pointer]:
            - /url: /politicians/ca319040-cda8-348b-9647-3ac221674219/
            - generic [ref=f1e86]: GONZALEZ COLON, JENNIFFER
            - generic [ref=f1e87]: PNP | $435,150
          - link "PIERLUISI, PEDRO DEM | $269,974" [ref=f1e88] [cursor=pointer]:
            - /url: /politicians/22c9a6a6-88cd-6d38-c138-2581113e263a/
            - generic [ref=f1e89]: PIERLUISI, PEDRO
            - generic [ref=f1e90]: DEM | $269,974
          - link "FORTUNO, LUIS REP | $171,044" [ref=f1e91] [cursor=pointer]:
            - /url: /politicians/6b9a286c-9f17-0e8e-7833-fd2a9acd540e/
            - generic [ref=f1e92]: FORTUNO, LUIS
            - generic [ref=f1e93]: REP | $171,044
          - link "ACEVEDO-VILA, ANIBAL DEM | $167,874" [ref=f1e94] [cursor=pointer]:
            - /url: /politicians/1ce63590-6e6b-1a54-75f7-6241337bdae3/
            - generic [ref=f1e95]: ACEVEDO-VILA, ANIBAL
            - generic [ref=f1e96]: DEM | $167,874
          - link "HERNANDEZ RIVERA, PABLO JOSE DEM | $135,300" [ref=f1e97] [cursor=pointer]:
            - /url: /politicians/cbd701cc-c8cd-642e-2347-ccea15db4ce0/
            - generic [ref=f1e98]: HERNANDEZ RIVERA, PABLO JOSE
            - generic [ref=f1e99]: DEM | $135,300
          - link "ROMERO-BARCELO, CARLOS DEM | $111,842" [ref=f1e100] [cursor=pointer]:
            - /url: /politicians/11483227-cab8-f4a9-b08f-55c64e851c19/
            - generic [ref=f1e101]: ROMERO-BARCELO, CARLOS
            - generic [ref=f1e102]: DEM | $111,842
          - link "PRATS PALERM, ROBERTO L DEM | $44,748" [ref=f1e103] [cursor=pointer]:
            - /url: /politicians/bb021050-da7a-c4e3-0d0c-2b1f56e40303/
            - generic [ref=f1e104]: PRATS PALERM, ROBERTO L
            - generic [ref=f1e105]: DEM | $44,748
          - link "VILLAFANE RAMOS, WILLIAM ELY NPP | $20,100" [ref=f1e106] [cursor=pointer]:
            - /url: /politicians/59e0eb11-a4b1-dd31-2934-b8994c1da58c/
            - generic [ref=f1e107]: VILLAFANE RAMOS, WILLIAM ELY
            - generic [ref=f1e108]: NPP | $20,100
          - link "COLORADO-LAGUNA, ANTONIO J DEM | $18,100" [ref=f1e109] [cursor=pointer]:
            - /url: /politicians/96f98cb2-4686-e2e4-18cf-09513ed4db9b/
            - generic [ref=f1e110]: COLORADO-LAGUNA, ANTONIO J
            - generic [ref=f1e111]: DEM | $18,100
          - link "SALAZAR, ALFREDO DEM | $15,800" [ref=f1e112] [cursor=pointer]:
            - /url: /politicians/09035b65-9380-9d80-68ab-602bf3f818e5/
            - generic [ref=f1e113]: SALAZAR, ALFREDO
            - generic [ref=f1e114]: DEM | $15,800
          - link "BENITEZ, CELESTE OTH | $15,500" [ref=f1e115] [cursor=pointer]:
            - /url: /politicians/30631204-94fb-9a6a-1645-ee32d4d0f648/
            - generic [ref=f1e116]: BENITEZ, CELESTE
            - generic [ref=f1e117]: OTH | $15,500
          - link "FUSTER, JAIME B DEM | $14,061" [ref=f1e118] [cursor=pointer]:
            - /url: /politicians/9a615c4b-0207-94a9-73ff-7947545905dd/
            - generic [ref=f1e119]: FUSTER, JAIME B
            - generic [ref=f1e120]: DEM | $14,061
          - link "CORRADA, BALTASAR DEM | $8,650" [ref=f1e121] [cursor=pointer]:
            - /url: /politicians/0190bff6-b894-7206-c511-bcdb4b822c86/
            - generic [ref=f1e122]: CORRADA, BALTASAR
            - generic [ref=f1e123]: DEM | $8,650
          - link "ROMAN, ELMER LUIS NPP | $8,300" [ref=f1e124] [cursor=pointer]:
            - /url: /politicians/4d6ab08c-6f52-8747-2776-a9efae53c63c/
            - generic [ref=f1e125]: ROMAN, ELMER LUIS
            - generic [ref=f1e126]: NPP | $8,300
          - link "RIVERA-LASSEN, ANA IRMA DEM | $6,500" [ref=f1e127] [cursor=pointer]:
            - /url: /politicians/9cac7516-7ca4-aeff-2cf5-7f17982b972c/
            - generic [ref=f1e128]: RIVERA-LASSEN, ANA IRMA
            - generic [ref=f1e129]: DEM | $6,500
          - link "ALOMAR, RAFAEL COX DEM | $6,000" [ref=f1e130] [cursor=pointer]:
            - /url: /politicians/cee0459e-ce30-eb37-4798-7f55fce3d530/
            - generic [ref=f1e131]: ALOMAR, RAFAEL COX
            - generic [ref=f1e132]: DEM | $6,000
          - link "RAMIREZ, MIRIAM REP | $2,000" [ref=f1e133] [cursor=pointer]:
            - /url: /politicians/5490436f-f20e-a2ce-83ac-7ac475ec5db5/
            - generic [ref=f1e134]: RAMIREZ, MIRIAM
            - generic [ref=f1e135]: REP | $2,000
          - link "ROSA, ANGEL DEM | $1,000" [ref=f1e136] [cursor=pointer]:
            - /url: /politicians/2a1d8124-f26a-3d89-8742-bcdd3bbdb95a/
            - generic [ref=f1e137]: ROSA, ANGEL
            - generic [ref=f1e138]: DEM | $1,000
          - link "PESQUERA, CARLOS IGNACIO OTH | $1,000" [ref=f1e139] [cursor=pointer]:
            - /url: /politicians/300024ec-7d36-4fed-f08a-177818b59983/
            - generic [ref=f1e140]: PESQUERA, CARLOS IGNACIO
            - generic [ref=f1e141]: OTH | $1,000
          - link "RODRIGUEZ, CHARLES A CHARLIE DEM | $1,000" [ref=f1e142] [cursor=pointer]:
            - /url: /politicians/4acb8157-ba0c-0577-a1a8-e5199c30e963/
            - generic [ref=f1e143]: RODRIGUEZ, CHARLES A CHARLIE
            - generic [ref=f1e144]: DEM | $1,000
          - link "FAMADAS, NELSON DEM | $700" [ref=f1e145] [cursor=pointer]:
            - /url: /politicians/fd98efdb-3469-9cb6-d6e0-b3ee97e2a3ad/
            - generic [ref=f1e146]: FAMADAS, NELSON
            - generic [ref=f1e147]: DEM | $700
          - link "RIVERA, JOSE TORRES ARSENIO DEM" [ref=f1e148] [cursor=pointer]:
            - /url: /politicians/c90ddb9f-5024-31d2-ad2f-f8503934d526/
            - generic [ref=f1e149]: RIVERA, JOSE TORRES ARSENIO
            - generic [ref=f1e150]: DEM
          - link "BRUNO, ERIC M DEM" [ref=f1e151] [cursor=pointer]:
            - /url: /politicians/22553697-ae7e-5bfa-d795-10dc7f2493ea/
            - generic [ref=f1e152]: BRUNO, ERIC M
            - generic [ref=f1e153]: DEM
          - link "SAN INOCENCIO, VICTOR GARCIA IND" [ref=f1e154] [cursor=pointer]:
            - /url: /politicians/8d3f38ca-8ca1-fedb-0b61-c0fe3412998a/
            - generic [ref=f1e155]: SAN INOCENCIO, VICTOR GARCIA
            - generic [ref=f1e156]: IND
          - link "VIVONI, MIGUEL HERNANDEZ OTH" [ref=f1e157] [cursor=pointer]:
            - /url: /politicians/161618b6-e28d-4167-5871-f4d75b6f446b/
            - generic [ref=f1e158]: VIVONI, MIGUEL HERNANDEZ
            - generic [ref=f1e159]: OTH
          - link "VELAZQUEZ LOPEZ, CARLOS A. OTH" [ref=f1e160] [cursor=pointer]:
            - /url: /politicians/ebac25ae-fd69-699a-6c4e-bf26d3742463/
            - generic [ref=f1e161]: VELAZQUEZ LOPEZ, CARLOS A.
            - generic [ref=f1e162]: OTH
          - link "CORDOVA ITURREGUI, FELIX OTH" [ref=f1e163] [cursor=pointer]:
            - /url: /politicians/253a9377-21b4-5bd7-bae0-9301fdb14466/
            - generic [ref=f1e164]: CORDOVA ITURREGUI, FELIX
            - generic [ref=f1e165]: OTH
          - link "NOGALES-MOLINELLI, MARIANA PPT" [ref=f1e166] [cursor=pointer]:
            - /url: /politicians/70cd8c70-6040-bb6b-faf5-2cebaf478352/
            - generic [ref=f1e167]: NOGALES-MOLINELLI, MARIANA
            - generic [ref=f1e168]: PPT
          - link "RAMIREZ MORALES, VIVIANA REP" [ref=f1e169] [cursor=pointer]:
            - /url: /politicians/a60aec8f-8c3b-82f1-035d-d8677a14f84a/
            - generic [ref=f1e170]: RAMIREZ MORALES, VIVIANA
            - generic [ref=f1e171]: REP
          - link "ALBORS, JUAN CARLOS UN" [ref=f1e172] [cursor=pointer]:
            - /url: /politicians/e20d10fb-4c06-f8b9-c572-bc2bc6e3f6c3/
            - generic [ref=f1e173]: ALBORS, JUAN CARLOS
            - generic [ref=f1e174]: UN
          - link "JORDAN, ZAYIRA UN" [ref=f1e175] [cursor=pointer]:
            - /url: /politicians/f8e3952c-1f42-d8c1-6e4a-4e09dc9363d1/
            - generic [ref=f1e176]: JORDAN, ZAYIRA
            - generic [ref=f1e177]: UN
          - link "LABOY-ALVARADO, ZOE M OTH" [ref=f1e178] [cursor=pointer]:
            - /url: /politicians/83f0de83-53d3-6362-5909-c3b4693bb823/
            - generic [ref=f1e179]: LABOY-ALVARADO, ZOE M
            - generic [ref=f1e180]: OTH
          - link "NADAL POWER, JOSE DEM" [ref=f1e181] [cursor=pointer]:
            - /url: /politicians/2d6ce818-f88f-d1ea-ad74-2815e29e9c1e/
            - generic [ref=f1e182]: NADAL POWER, JOSE
            - generic [ref=f1e183]: DEM
          - link "RODRIGUEZ DIAZ, HUGO OTH" [ref=f1e184] [cursor=pointer]:
            - /url: /politicians/64c05b79-fc37-e6e0-18bc-8321633a9330/
            - generic [ref=f1e185]: RODRIGUEZ DIAZ, HUGO
            - generic [ref=f1e186]: OTH
          - link "PINERO, LUIS ROBERTO OTH" [ref=f1e187] [cursor=pointer]:
            - /url: /politicians/66acd2fd-7bd7-70ef-2bb5-75cfc6a7ce56/
            - generic [ref=f1e188]: PINERO, LUIS ROBERTO
            - generic [ref=f1e189]: OTH
          - link "HENRIQUEZ, ADA NORAH ESQ OTH" [ref=f1e190] [cursor=pointer]:
            - /url: /politicians/5f02f07e-f9b9-2882-68e8-336544d8291f/
            - generic [ref=f1e191]: HENRIQUEZ, ADA NORAH ESQ
            - generic [ref=f1e192]: OTH
          - link "VELAZQUEZ CORREA, ROBERTO KARLO OTH" [ref=f1e193] [cursor=pointer]:
            - /url: /politicians/5978bfe9-2a84-9e5e-2160-2cf7eab4cacb/
            - generic [ref=f1e194]: VELAZQUEZ CORREA, ROBERTO KARLO
            - generic [ref=f1e195]: OTH
          - link "GUZMAN RIVERA, MARIA DE LOURDES OTH" [ref=f1e196] [cursor=pointer]:
            - /url: /politicians/33fb6ace-b85d-a96c-8fe5-d115db460055/
            - generic [ref=f1e197]: GUZMAN RIVERA, MARIA DE LOURDES
            - generic [ref=f1e198]: OTH
          - link "CATALA, FRANCISCO UNK" [ref=f1e199] [cursor=pointer]:
            - /url: /politicians/26dc71f4-3636-853c-5b3c-e0f573b587ed/
            - generic [ref=f1e200]: CATALA, FRANCISCO
            - generic [ref=f1e201]: UNK
          - link "CRUZ VELEZ, EDGARDO NON" [ref=f1e202] [cursor=pointer]:
            - /url: /politicians/b6f71587-ea4a-c665-5a40-4b4dbe8cc622/
            - generic [ref=f1e203]: CRUZ VELEZ, EDGARDO
            - generic [ref=f1e204]: NON
          - link "SOTIRIOU DROZ, MELIN ARGYRO DEM" [ref=f1e205] [cursor=pointer]:
            - /url: /politicians/40186924-d80e-8e8e-dbbb-706df79a4166/
            - generic [ref=f1e206]: SOTIRIOU DROZ, MELIN ARGYRO
            - generic [ref=f1e207]: DEM
          - link "BENITEZ, JAIME UNK" [ref=f1e208] [cursor=pointer]:
            - /url: /politicians/587916a8-140f-e98c-aad2-b8d59c2b8813/
            - generic [ref=f1e209]: BENITEZ, JAIME
            - generic [ref=f1e210]: UNK
          - link "BAYOUTH, ALFREDO CASTELLANOS IND" [ref=f1e211] [cursor=pointer]:
            - /url: /politicians/3d394acc-af95-34bb-85c9-52ae198fb3c4/
            - generic [ref=f1e212]: BAYOUTH, ALFREDO CASTELLANOS
            - generic [ref=f1e213]: IND
          - link "FERRER RIOS, HECTOR DEM" [ref=f1e214] [cursor=pointer]:
            - /url: /politicians/7524e833-e599-3883-7b4c-ca221850d2c6/
            - generic [ref=f1e215]: FERRER RIOS, HECTOR
            - generic [ref=f1e216]: DEM
          - link "GUILLONT JUARBE, SADIASEPT OTH" [ref=f1e217] [cursor=pointer]:
            - /url: /politicians/fbaab01d-283c-ead0-2d05-bd49c2565798/
            - generic [ref=f1e218]: GUILLONT JUARBE, SADIASEPT
            - generic [ref=f1e219]: OTH
          - link "MARTINEZ-BIRRIEL, JESSICA IND" [ref=f1e220] [cursor=pointer]:
            - /url: /politicians/9cfcfe65-301a-72b7-bd13-f87f067d6b60/
            - generic [ref=f1e221]: MARTINEZ-BIRRIEL, JESSICA
            - generic [ref=f1e222]: IND
          - link "FRED-SALGADO, LUIS IND" [ref=f1e223] [cursor=pointer]:
            - /url: /politicians/a8cb2be7-3485-1ea7-28e6-75ba7d9a5b1e/
            - generic [ref=f1e224]: FRED-SALGADO, LUIS
            - generic [ref=f1e225]: IND
          - link "FERRER, HECTOR J DEM" [ref=f1e226] [cursor=pointer]:
            - /url: /politicians/08d93d5e-d167-ffd4-c6fa-352c66db1719/
            - generic [ref=f1e227]: FERRER, HECTOR J
            - generic [ref=f1e228]: DEM
          - link "CALERO, MARTA FONT IND" [ref=f1e229] [cursor=pointer]:
            - /url: /politicians/1b3be7b9-e95b-7c53-8ee0-08c561a7a3fc/
            - generic [ref=f1e230]: CALERO, MARTA FONT
            - generic [ref=f1e231]: IND
          - link "RODRIGUEZ ORELLANA, MANUEL IND" [ref=f1e232] [cursor=pointer]:
            - /url: /politicians/30ab554a-caa1-d249-4fda-ee8d464a6119/
            - generic [ref=f1e233]: RODRIGUEZ ORELLANA, MANUEL
            - generic [ref=f1e234]: IND
        - generic [ref=f1e235]:
          - generic [ref=f1e236]: Showing 1-50
          - generic [ref=f1e237]:
            - button "First" [disabled] [ref=f1e238]
            - button "Prev" [disabled] [ref=f1e239]
            - button "1" [ref=f1e240] [cursor=pointer]
            - button "Next" [ref=f1e241] [cursor=pointer]
  - contentinfo [ref=f1e242]:
    - paragraph [ref=f1e243]:
      - link "elect.info" [ref=f1e244] [cursor=pointer]:
        - /url: https://preview.elect.info/
      - text: "| Data from"
      - link "Federal Election Commission" [ref=f1e245] [cursor=pointer]:
        - /url: https://preview.elect.info/datasources/fec.gov/
      - text: "| Generated 2026-10-23"
```

# Test source

```ts
  1  | import { test, expect } from '@playwright/test';
  2  | import { canonicalPath, toRelativePath } from './helpers';
  3  | 
  4  | // Release contract after the coordinated graph + PagePaths cutover (#462): all six
  5  | // delegates exist as current00 entities; the index and00 alias serve them, their
  6  | // live UUID pages canonicalize to00, and historical98 aliases redirect to00.
  7  | // This is intentionally red on the old98 graph / stale alias snapshot. The local
  8  | // district-categories fixture still proves98 rows keep safe current-UUID links;
  9  | // neither that fixture nor these inventory assertions may be skipped for missing rows.
  10 | for (const state of ['AS', 'GU', 'MP', 'VI', 'DC', 'PR']) {
  11 |   test(`${state} delegate district has a current00 canonical and historical98 redirect`, async ({ page, request }) => {
  12 |     const dataResponse = page.waitForResponse(response => {
  13 |       if (!response.url().includes('/api/graphql') || response.request().method() !== 'POST') return false;
  14 |       try {
  15 |         const body = response.request().postDataJSON();
  16 |         const variables = body?.variables;
  17 |         const filters = String(variables?.filter).split(',');
  18 |         return /\bbrowseEntities\s*\(/.test(body?.query || '') && variables?.entityType === 'District' &&
  19 |           filters.includes('district_type:cd') && filters.includes(`state:${state}`);
  20 |       } catch { return false; }
  21 |     });
  22 |     await page.goto(`/districts/?state=${state}&tab=congressional`);
  23 |     const payload = await (await dataResponse).json();
  24 |     expect(payload.errors, `${state}: current inventory query must succeed`).toBeUndefined();
  25 |     const inventory = payload.data?.browseEntities;
  26 |     expect(inventory?.total, `${state}: full congressional inventory must contain exactly one delegate`).toBe(1);
  27 |     expect(inventory?.hasMore, `${state}: delegate inventory must not be truncated`).toBe(false);
  28 |     const rows = inventory?.results;
  29 |     expect(rows, `${state}: exactly one delegate must remain in the graph`).toHaveLength(1);
  30 |     const row = rows[0];
  31 |     expect(row.state).toBe(state);
  32 |     expect(row.district).toBe('00');
  33 |     const metadata = JSON.parse(row.metadata || '{}');
  34 |     expect(metadata.district_type).toBe('cd');
  35 |     expect(metadata.district_slug.toLowerCase()).toBe(`${state.toLowerCase()}-00`);
  36 |     expect(row.id).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i);
  37 | 
  38 |     await expect(page.locator('#district-state-select')).toHaveValue(state);
  39 |     const result = page.locator('.entity-search-result');
  40 |     await expect(result).toHaveCount(1, { timeout: 15000 });
  41 |     await expect(result).toContainText(`${state}-00`);
  42 |     const canonical = `/districts/${state.toLowerCase()}-00/`;
  43 |     await expect(result).toHaveAttribute('href', canonical);
  44 |     const response = await page.goto(canonical);
  45 |     expect(response?.status(), `${state}:00 must serve, not redirect or miss`).toBe(200);
  46 |     await expect(page.locator('h1')).toBeVisible();
  47 |     expect(canonicalPath(await page.content())).toBe(canonical);
  48 | 
  49 |     const storage = await request.get(`/districts/${row.id}/`, { maxRedirects: 0 });
  50 |     expect(storage.status(), `${state}: graph-current UUID page must serve`).toBe(200);
  51 |     expect(canonicalPath(await storage.text()), `${state}: current UUID must share00 canonical`).toBe(canonical);
  52 |     const historical = await request.get(`/districts/${state.toLowerCase()}-98/`, { maxRedirects: 0 });
> 53 |     expect(historical.status(), `${state}:98 must redirect rather than retire or retain an old owner`).toBe(301);
     |                                                                                                        ^ Error: PR:98 must redirect rather than retire or retain an old owner
  54 |     expect(toRelativePath(historical.headers()['location'] || '')).toBe(canonical);
  55 |   });
  56 | }
  57 | 
```