# 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/sitemap.spec.ts >> sitemap URL validation >> districts sitemap - sample URLs resolve
- Location: tests/ui/sitemap.spec.ts:305:7

# Error details

```
Error: Errors: Expected 200 for /districts/gu-00/, got 404

expect(received).toHaveLength(expected)

Expected length: 0
Received length: 1
Received array:  ["Expected 200 for /districts/gu-00/, got 404"]
```

# Page snapshot

```yaml
- generic [active] [ref=f5e1]:
  - banner [ref=f5e2]:
    - heading "Florida Congressional District 21" [level=1] [ref=f5e3]
    - paragraph [ref=f5e4]: Congressional District Profile
  - generic [ref=f5e5]:
    - generic [ref=f5e6]:
      - generic [ref=f5e7]: Not signed in
      - generic [ref=f5e9]:
        - link "Log in" [ref=f5e10] [cursor=pointer]:
          - /url: /outpost.goauthentik.io/start?rd=http%3A%2F%2Fus-elect-info.electinfo.svc.cluster.local%2Fdistricts%2Ffl-21%2F
        - link "Create an account" [ref=f5e11] [cursor=pointer]:
          - /url: /signin/register?rd=http%3A%2F%2Fus-elect-info.electinfo.svc.cluster.local%2Fdistricts%2Ffl-21%2F
    - toolbar "Member tools" [ref=f5e12]:
      - button "All cycles (Sign in to use the cycle facet)" [disabled] [ref=f5e13] [cursor=pointer]:
        - generic [ref=f5e17]: All cycles
      - button "Graph (Sign in to use Graph)" [disabled] [ref=f5e20] [cursor=pointer]:
        - generic [ref=f5e29]: Graph
  - generic [ref=f5e32]:
    - heading "Overview" [level=2] [ref=f5e33]
    - generic [ref=f5e34]:
      - term [ref=f5e35]: District ID
      - definition [ref=f5e36]: FL-21
      - term [ref=f5e37]: State
      - definition [ref=f5e38]:
        - link "Florida" [ref=f5e39] [cursor=pointer]:
          - /url: https://us.elect.info/states/florida/
      - term [ref=f5e40]: District Number
      - definition [ref=f5e41]: "21"
      - term [ref=f5e42]: Total Candidates
      - definition [ref=f5e43]: "60"
      - term [ref=f5e44]: Election Cycles
      - definition [ref=f5e45]:
        - generic [ref=f5e46]:
          - link "2026" [ref=f5e47] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2026/
          - text: ","
          - link "2024" [ref=f5e48] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2024/
          - text: ","
          - link "2022" [ref=f5e49] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2022/
          - text: ","
          - link "2020" [ref=f5e50] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2020/
          - text: ","
          - link "2018" [ref=f5e51] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2018/
          - text: ","
          - link "2016" [ref=f5e52] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2016/
          - text: ","
          - link "2014" [ref=f5e53] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2014/
          - text: ","
          - link "2012" [ref=f5e54] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2012/
          - text: ","
          - link "2010" [ref=f5e55] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2010/
          - text: ","
          - link "2008" [ref=f5e56] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2008/
          - text: ","
          - link "2006" [ref=f5e57] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2006/
          - text: ","
          - link "2004" [ref=f5e58] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2004/
          - text: ","
          - link "2002" [ref=f5e59] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2002/
          - text: ","
          - link "2000" [ref=f5e60] [cursor=pointer]:
            - /url: https://us.elect.info/elections/2000/
          - text: ","
          - link "1998" [ref=f5e61] [cursor=pointer]:
            - /url: https://us.elect.info/elections/1998/
          - text: ","
          - link "1996" [ref=f5e62] [cursor=pointer]:
            - /url: https://us.elect.info/elections/1996/
          - text: ","
          - link "1994" [ref=f5e63] [cursor=pointer]:
            - /url: https://us.elect.info/elections/1994/
          - text: ","
          - link "1992" [ref=f5e64] [cursor=pointer]:
            - /url: https://us.elect.info/elections/1992/
    - paragraph [ref=f5e65]:
      - link "View office details for U.S. Representative - Florida District 21" [ref=f5e66] [cursor=pointer]:
        - /url: https://us.elect.info/offices/house/fl-21/
  - generic [ref=f5e67]:
    - heading "Demographics" [level=2] [ref=f5e68]
    - generic [ref=f5e69]:
      - term [ref=f5e70]: Total Citizen Population
      - definition [ref=f5e71]: 759,730
      - term [ref=f5e72]: Citizen Voting Age Population (CVAP)
      - definition [ref=f5e73]: 616,557
    - heading "Citizen Population by Race/Ethnicity" [level=3] [ref=f5e74]
    - table [ref=f5e75]:
      - rowgroup [ref=f5e76]:
        - row [ref=f5e77]:
          - columnheader "Group" [ref=f5e78]
          - columnheader "Citizens" [ref=f5e79]
          - columnheader "Share" [ref=f5e80]
      - rowgroup [ref=f5e81]:
        - row [ref=f5e82]:
          - cell "Non-Hispanic" [ref=f5e83]
          - cell "634,760" [ref=f5e84]
          - cell "83.6%" [ref=f5e85]
        - row [ref=f5e86]:
          - cell "Hispanic" [ref=f5e87]
          - cell "124,966" [ref=f5e88]
          - cell "16.4%" [ref=f5e89]
        - row [ref=f5e90]:
          - cell "White" [ref=f5e91]
          - cell "503,536" [ref=f5e92]
          - cell "66.3%" [ref=f5e93]
        - row [ref=f5e94]:
          - cell "Black" [ref=f5e95]
          - cell "97,523" [ref=f5e96]
          - cell "12.8%" [ref=f5e97]
        - row [ref=f5e98]:
          - cell "Asian" [ref=f5e99]
          - cell "14,284" [ref=f5e100]
          - cell "1.9%" [ref=f5e101]
        - row [ref=f5e102]:
          - cell "American Indian / Alaska Native" [ref=f5e103]
          - cell "638" [ref=f5e104]
          - cell "0.1%" [ref=f5e105]
        - row [ref=f5e106]:
          - cell "Native Hawaiian / Pacific Islander" [ref=f5e107]
          - cell "403" [ref=f5e108]
          - cell "0.1%" [ref=f5e109]
        - row [ref=f5e110]:
          - cell "Two or More Races" [ref=f5e111]
          - cell "2,637" [ref=f5e112]
          - cell "0.3%" [ref=f5e113]
    - heading "Citizen Voting Age Population by Race/Ethnicity" [level=3] [ref=f5e114]
    - table [ref=f5e115]:
      - rowgroup [ref=f5e116]:
        - row [ref=f5e117]:
          - columnheader "Group" [ref=f5e118]
          - columnheader "CVAP" [ref=f5e119]
          - columnheader "Share" [ref=f5e120]
      - rowgroup [ref=f5e121]:
        - row [ref=f5e122]:
          - cell "Non-Hispanic" [ref=f5e123]
          - cell "530,254" [ref=f5e124]
          - cell "86.0%" [ref=f5e125]
        - row [ref=f5e126]:
          - cell "Hispanic" [ref=f5e127]
          - cell "86,307" [ref=f5e128]
          - cell "14.0%" [ref=f5e129]
        - row [ref=f5e130]:
          - cell "White" [ref=f5e131]
          - cell "434,118" [ref=f5e132]
          - cell "70.4%" [ref=f5e133]
        - row [ref=f5e134]:
          - cell "Black" [ref=f5e135]
          - cell "77,325" [ref=f5e136]
          - cell "12.5%" [ref=f5e137]
        - row [ref=f5e138]:
          - cell "Asian" [ref=f5e139]
          - cell "13,920" [ref=f5e140]
          - cell "2.3%" [ref=f5e141]
        - row [ref=f5e142]:
          - cell "American Indian / Alaska Native" [ref=f5e143]
          - cell "3,589" [ref=f5e144]
          - cell "0.6%" [ref=f5e145]
        - row [ref=f5e146]:
          - cell "Native Hawaiian / Pacific Islander" [ref=f5e147]
          - cell "272" [ref=f5e148]
          - cell "0.0%" [ref=f5e149]
        - row [ref=f5e150]:
          - cell "Two or More Races" [ref=f5e151]
          - cell "1,702" [ref=f5e152]
          - cell "0.3%" [ref=f5e153]
    - paragraph [ref=f5e154]: "Source: Redistricting Data Hub / U.S. Census Bureau CVAP Special Tabulation."
  - generic [ref=f5e155]:
    - heading "Candidates" [level=2] [ref=f5e156]
    - generic [ref=f5e158]:
      - generic [ref=f5e159]:
        - generic [ref=f5e160]:
          - combobox "Search entities" [ref=f5e161]
          - status [ref=f5e162]
        - button "Search" [ref=f5e163] [cursor=pointer]
      - generic [ref=f5e164]:
        - heading "Candidates" [level=3] [ref=f5e166]
        - generic [ref=f5e167]:
          - link "MAST, BRIAN REP | $3,392,760" [ref=f5e168] [cursor=pointer]:
            - /url: /politicians/c1e4750c-0498-2576-84d6-f16b50b807da/
            - generic [ref=f5e169]: MAST, BRIAN
            - generic [ref=f5e170]: REP | $3,392,760
          - link "DIAZ-BALART, LINCOLN REP | $2,648,911" [ref=f5e171] [cursor=pointer]:
            - /url: /politicians/ef285428-0192-8dce-d6a9-0adfff56f619/
            - generic [ref=f5e172]: DIAZ-BALART, LINCOLN
            - generic [ref=f5e173]: REP | $2,648,911
          - link "MARTINEZ, RAUL L DEM | $285,190" [ref=f5e174] [cursor=pointer]:
            - /url: /politicians/52c50823-f6f2-bd8c-d49d-359cc594aa5c/
            - generic [ref=f5e175]: MARTINEZ, RAUL L
            - generic [ref=f5e176]: DEM | $285,190
          - link "BUONGIORNO, JEFFREY D REP | $85,190" [ref=f5e177] [cursor=pointer]:
            - /url: /politicians/b09e0ddf-f9cd-672b-c68d-04e70709c420/
            - generic [ref=f5e178]: BUONGIORNO, JEFFREY D
            - generic [ref=f5e179]: REP | $85,190
          - link "SOUTO, JAVIER D REP | $7,924" [ref=f5e180] [cursor=pointer]:
            - /url: /politicians/58294238-e427-5b48-985d-2d2f14940f6f/
            - generic [ref=f5e181]: SOUTO, JAVIER D
            - generic [ref=f5e182]: REP | $7,924
          - link "GONZALEZ-SOLDEVILLA, FRANCISCO JOSE DEM | $3,247" [ref=f5e183] [cursor=pointer]:
            - /url: /politicians/99ec1a23-f310-042c-ec8c-c9a6ad9f3445/
            - generic [ref=f5e184]: GONZALEZ-SOLDEVILLA, FRANCISCO JOSE
            - generic [ref=f5e185]: DEM | $3,247
          - link "WITKOP, THOMAS DEM | $2,000" [ref=f5e186] [cursor=pointer]:
            - /url: /politicians/c6f2c4c2-daf9-af2a-e9d2-3d9d158aa6f5/
            - generic [ref=f5e187]: WITKOP, THOMAS
            - generic [ref=f5e188]: DEM | $2,000
          - link "TAYLOR, BERNARD DEM | $1,000" [ref=f5e189] [cursor=pointer]:
            - /url: /politicians/f1308f34-1b69-15ed-b3cd-ef442fbfdcb1/
            - generic [ref=f5e190]: TAYLOR, BERNARD
            - generic [ref=f5e191]: DEM | $1,000
          - link "CUSACK, PATRICK M DEM | $250" [ref=f5e192] [cursor=pointer]:
            - /url: /politicians/9b75a37b-d6cb-1bac-3d5b-fd1969f464af/
            - generic [ref=f5e193]: CUSACK, PATRICK M
            - generic [ref=f5e194]: DEM | $250
          - link "SCHWARTZ, DEREK A. REP" [ref=f5e195] [cursor=pointer]:
            - /url: /politicians/c49c9047-83df-52f8-87b7-bc048626f3ba/
            - generic [ref=f5e196]: SCHWARTZ, DEREK A.
            - generic [ref=f5e197]: REP
          - link "ACOSTA, CHRISTIAN F. REP" [ref=f5e198] [cursor=pointer]:
            - /url: /politicians/711239a7-4710-a738-1c7e-bf62fde43e29/
            - generic [ref=f5e199]: ACOSTA, CHRISTIAN F.
            - generic [ref=f5e200]: REP
          - link "TROUT, W. MICHAEL \"MIKE\" FL" [ref=f5e201] [cursor=pointer]:
            - /url: /politicians/38298f3a-cf41-fe69-cbf7-a2d9f084a809/
            - generic [ref=f5e202]: TROUT, W. MICHAEL "MIKE"
            - generic [ref=f5e203]: FL
          - link "DA ROSA, VICTOR GARCIA REP" [ref=f5e204] [cursor=pointer]:
            - /url: /politicians/7e20772c-0783-01f4-b50c-b0e058f2a201/
            - generic [ref=f5e205]: DA ROSA, VICTOR GARCIA
            - generic [ref=f5e206]: REP
          - link "WILES, RICK REP" [ref=f5e207] [cursor=pointer]:
            - /url: /politicians/e9218226-5063-9dfb-1d8e-416cf582484a/
            - generic [ref=f5e208]: WILES, RICK
            - generic [ref=f5e209]: REP
          - link "JETTA, KURT REP" [ref=f5e210] [cursor=pointer]:
            - /url: /politicians/2da30318-2a18-5af6-3e52-cd13e4f74f8e/
            - generic [ref=f5e211]: JETTA, KURT
            - generic [ref=f5e212]: REP
          - link "LLOYD, JOHNNIE REP" [ref=f5e213] [cursor=pointer]:
            - /url: /politicians/c0e0fcde-bdd4-64c9-6765-963821d802e3/
            - generic [ref=f5e214]: LLOYD, JOHNNIE
            - generic [ref=f5e215]: REP
          - link "WEISS, GUIDO DEM" [ref=f5e216] [cursor=pointer]:
            - /url: /politicians/1db7b490-7605-9e29-70f2-8e631af3252e/
            - generic [ref=f5e217]: WEISS, GUIDO
            - generic [ref=f5e218]: DEM
          - link "BLUEMLING, MICHAEL JOSEPH JR REP" [ref=f5e219] [cursor=pointer]:
            - /url: /politicians/8bcdd775-ff88-0adb-5c45-9a4616bddf98/
            - generic [ref=f5e220]: BLUEMLING, MICHAEL JOSEPH JR
            - generic [ref=f5e221]: REP
          - link "GALINSKY, SETH W" [ref=f5e222] [cursor=pointer]:
            - /url: /politicians/f0671470-e1ba-71a8-52ce-976d80f27ddb/
            - generic [ref=f5e223]: GALINSKY, SETH
            - generic [ref=f5e224]: W
          - link "ALLBRITTON, RICHARD DEM" [ref=f5e225] [cursor=pointer]:
            - /url: /politicians/116dfe2f-d76b-8aa3-fa6b-6ac0e3f86ca7/
            - generic [ref=f5e226]: ALLBRITTON, RICHARD
            - generic [ref=f5e227]: DEM
          - link "OCONNOR, EDWARD F MR. DEM" [ref=f5e228] [cursor=pointer]:
            - /url: /politicians/8c7f5ab4-2346-c2bb-5a9d-abaccbfd8e4a/
            - generic [ref=f5e229]: OCONNOR, EDWARD F MR.
            - generic [ref=f5e230]: DEM
          - link "COLON, HENRY REP" [ref=f5e231] [cursor=pointer]:
            - /url: /politicians/c0bab0b8-75e8-9789-b06f-28306393bb5c/
            - generic [ref=f5e232]: COLON, HENRY
            - generic [ref=f5e233]: REP
          - link "SHERRILL, REBA REP" [ref=f5e234] [cursor=pointer]:
            - /url: /politicians/7253bee8-6886-3bab-0e5c-a205a439ea3b/
            - generic [ref=f5e235]: SHERRILL, REBA
            - generic [ref=f5e236]: REP
          - link "BLASS, PIOTR DR REP" [ref=f5e237] [cursor=pointer]:
            - /url: /politicians/e2e9fd9c-e456-0d3b-814c-24393e9d67d5/
            - generic [ref=f5e238]: BLASS, PIOTR DR
            - generic [ref=f5e239]: REP
          - link "SANCHEZ, WILLAIM DEM" [ref=f5e240] [cursor=pointer]:
            - /url: /politicians/e9291c98-1f24-fc8e-24b1-1b0ce8c0ebce/
            - generic [ref=f5e241]: SANCHEZ, WILLAIM
            - generic [ref=f5e242]: DEM
          - link "CANTON, STEPHEN GREGORY IND" [ref=f5e243] [cursor=pointer]:
            - /url: /politicians/277a2085-7630-8789-57e6-0e523794640a/
            - generic [ref=f5e244]: CANTON, STEPHEN GREGORY
            - generic [ref=f5e245]: IND
          - link "MAURER, GEORGE UNK" [ref=f5e246] [cursor=pointer]:
            - /url: /politicians/8b93ac7b-0442-c4c8-651c-57685a5f3296/
            - generic [ref=f5e247]: MAURER, GEORGE
            - generic [ref=f5e248]: UNK
          - link "COOKE, ALEXANDER R NPA" [ref=f5e249] [cursor=pointer]:
            - /url: /politicians/9f408d05-4a85-efc4-1f24-88623d24b792/
            - generic [ref=f5e250]: COOKE, ALEXANDER R
            - generic [ref=f5e251]: NPA
          - link "HARVILLA, SHANNON RICHARD DEM" [ref=f5e252] [cursor=pointer]:
            - /url: /politicians/c67f718a-fae4-5827-894e-d7051301c16b/
            - generic [ref=f5e253]: HARVILLA, SHANNON RICHARD
            - generic [ref=f5e254]: DEM
          - link "HENAO, CESAR NNE" [ref=f5e255] [cursor=pointer]:
            - /url: /politicians/d3d1cb12-4992-0e01-edcf-8bbad84ce279/
            - generic [ref=f5e256]: HENAO, CESAR
            - generic [ref=f5e257]: NNE
          - link "SCANLAN, AARON REP" [ref=f5e258] [cursor=pointer]:
            - /url: /politicians/06f87805-854f-cba4-8eb6-df8f36ea1dd6/
            - generic [ref=f5e259]: SCANLAN, AARON
            - generic [ref=f5e260]: REP
          - link "AARONS, ADAM DEM" [ref=f5e261] [cursor=pointer]:
            - /url: /politicians/9b42731e-bd2e-c0cf-68e8-57d998eb2376/
            - generic [ref=f5e262]: AARONS, ADAM
            - generic [ref=f5e263]: DEM
          - link "FEIT, KEITH DR. REP" [ref=f5e264] [cursor=pointer]:
            - /url: /politicians/183e3e85-606e-dcab-b8a2-e31bd438aa70/
            - generic [ref=f5e265]: FEIT, KEITH DR.
            - generic [ref=f5e266]: REP
          - link "MARTIN, JAMES DEM" [ref=f5e267] [cursor=pointer]:
            - /url: /politicians/cd20f7f8-221f-3102-fd37-55006df2f38f/
            - generic [ref=f5e268]: MARTIN, JAMES
            - generic [ref=f5e269]: DEM
          - link "CARAVETTA, SYLVIA W" [ref=f5e270] [cursor=pointer]:
            - /url: /politicians/530aa0c3-32da-056b-18d5-c24caa7aee46/
            - generic [ref=f5e271]: CARAVETTA, SYLVIA
            - generic [ref=f5e272]: W
          - link "GARZA, LAURA IND" [ref=f5e273] [cursor=pointer]:
            - /url: /politicians/befb5cf4-7f92-0ffe-03ac-752fb50d33f3/
            - generic [ref=f5e274]: GARZA, LAURA
            - generic [ref=f5e275]: IND
          - link "TOBIAS, TOBIAS UNK" [ref=f5e276] [cursor=pointer]:
            - /url: /politicians/c4f0fc02-f04f-b42c-d24f-8757b7ac0570/
            - generic [ref=f5e277]: TOBIAS, TOBIAS
            - generic [ref=f5e278]: UNK
          - link "STANDARD, SEAN DAVID MR. SR. REP" [ref=f5e279] [cursor=pointer]:
            - /url: /politicians/e810e458-1b71-8f49-25ae-892fb77ed119/
            - generic [ref=f5e280]: STANDARD, SEAN DAVID MR. SR.
            - generic [ref=f5e281]: REP
          - link "MARTZ, MELISSA REP" [ref=f5e282] [cursor=pointer]:
            - /url: /politicians/52317c1f-7c37-4c48-29b7-c0d697b1e93c/
            - generic [ref=f5e283]: MARTZ, MELISSA
            - generic [ref=f5e284]: REP
          - link "FELTON, ELIZABETH W" [ref=f5e285] [cursor=pointer]:
            - /url: /politicians/0fb00939-5010-0505-bfad-b05e21c2dc98/
            - generic [ref=f5e286]: FELTON, ELIZABETH
            - generic [ref=f5e287]: W
          - link "CANTON, STEPHEN G IND" [ref=f5e288] [cursor=pointer]:
            - /url: /politicians/b689d809-4a5c-0160-e953-59a4ee7be6e6/
            - generic [ref=f5e289]: CANTON, STEPHEN G
            - generic [ref=f5e290]: IND
          - link "NOGUEIRA, ALFREDO TOBIAS DEM" [ref=f5e291] [cursor=pointer]:
            - /url: /politicians/deba129a-8880-1a37-8372-9f7cbf83b747/
            - generic [ref=f5e292]: NOGUEIRA, ALFREDO TOBIAS
            - generic [ref=f5e293]: DEM
          - link "PANDICH, ELIZABETH DEM" [ref=f5e294] [cursor=pointer]:
            - /url: /politicians/fd8da588-cadf-99b5-bb42-c5d7be67b77d/
            - generic [ref=f5e295]: PANDICH, ELIZABETH
            - generic [ref=f5e296]: DEM
          - link "BLUEMING JR, MICHAEL JOESPH REP" [ref=f5e297] [cursor=pointer]:
            - /url: /politicians/1ab3c9f0-aa2e-037f-9576-54bb2b6d41b8/
            - generic [ref=f5e298]: BLUEMING JR, MICHAEL JOESPH
            - generic [ref=f5e299]: REP
          - link "SKRBIC, LJUBO DR. REP" [ref=f5e300] [cursor=pointer]:
            - /url: /politicians/1cd5f4db-5171-b08c-e1bb-c5113284fdf9/
            - generic [ref=f5e301]: SKRBIC, LJUBO DR.
            - generic [ref=f5e302]: REP
          - link "MALKEMUS, CHARLESTON NPA" [ref=f5e303] [cursor=pointer]:
            - /url: /politicians/2343c974-a123-88fe-f537-35035971605a/
            - generic [ref=f5e304]: MALKEMUS, CHARLESTON
            - generic [ref=f5e305]: NPA
          - link "SANTORO, DEAN REP" [ref=f5e306] [cursor=pointer]:
            - /url: /politicians/eccad946-7e79-6000-3cb3-4dff8392a942/
            - generic [ref=f5e307]: SANTORO, DEAN
            - generic [ref=f5e308]: REP
          - link "SKRBIC, LJUBO DR MD REP" [ref=f5e309] [cursor=pointer]:
            - /url: /politicians/f64fd769-98d7-b514-d882-24e72c117150/
            - generic [ref=f5e310]: SKRBIC, LJUBO DR MD
            - generic [ref=f5e311]: REP
          - link "LEVY, LAUREN ALLISON DEM" [ref=f5e312] [cursor=pointer]:
            - /url: /politicians/a27cbd23-63fc-fd0f-ee74-6473b3992d79/
            - generic [ref=f5e313]: LEVY, LAUREN ALLISON
            - generic [ref=f5e314]: DEM
          - link "VILARDI, MICHAEL REP" [ref=f5e315] [cursor=pointer]:
            - /url: /politicians/a588c8ff-df9e-6fe0-9f1c-771b5a18852e/
            - generic [ref=f5e316]: VILARDI, MICHAEL
            - generic [ref=f5e317]: REP
        - generic [ref=f5e318]:
          - generic [ref=f5e319]: Showing 1-50
          - generic [ref=f5e320]:
            - button "First" [disabled] [ref=f5e321]
            - button "Prev" [disabled] [ref=f5e322]
            - button "1" [ref=f5e323] [cursor=pointer]
            - button "Next" [ref=f5e324] [cursor=pointer]
  - contentinfo [ref=f5e325]:
    - paragraph [ref=f5e326]:
      - link "elect.info" [ref=f5e327] [cursor=pointer]:
        - /url: https://us.elect.info/
      - text: "| Data from"
      - link "Federal Election Commission" [ref=f5e328] [cursor=pointer]:
        - /url: https://us.elect.info/datasources/fec.gov/
      - text: "| Generated 2026-10-22"
```

# Test source

```ts
  218 |   });
  219 | 
  220 |   test('sitemap index lists no nested index', async ({ request }) => {
  221 |     const index = await (await request.get('/sitemap.xml')).text();
  222 |     const children = parseUrlsFromSitemap(index).map(u => new URL(u).pathname);
  223 |     expect(children.length).toBeGreaterThan(0);
  224 |     const nested: string[] = [];
  225 |     for (const path of children) {
  226 |       // The first bytes say urlset or sitemapindex; the bucket files run to megabytes.
  227 |       const res = await request.get(path, { headers: { Range: 'bytes=0-1023' } });
  228 |       if (res.status() === 404 && !STRICT) continue;
  229 |       expect([200, 206], `${path} should load`).toContain(res.status());
  230 |       if (!(await res.text()).includes('<urlset')) nested.push(path);
  231 |     }
  232 |     expect(nested, 'children of /sitemap.xml that are not urlsets').toEqual([]);
  233 |   });
  234 | 
  235 |   test('candidates sitemap - sample URLs resolve', async ({ page }) => {
  236 |     test.setTimeout(120000);
  237 | 
  238 |     // Navigate to a simple page first so we have a page context for fetch
  239 |     await page.goto('/');
  240 |     const baseUrl = new URL(page.url()).origin;
  241 | 
  242 |     const result = await testSitemapUrls(page, baseUrl, '/candidates/sitemap-candidates.xml');
  243 | 
  244 |     if (result.tested === 0 && !STRICT) {
  245 |       test.skip();
  246 |       return;
  247 |     }
  248 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  249 | 
  250 |     console.log(`Tested ${result.tested} URLs from candidates sitemap`);
  251 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  252 |   });
  253 | 
  254 |   test('committees sitemap - sample URLs resolve', async ({ page }) => {
  255 |     test.setTimeout(120000);
  256 | 
  257 |     // Navigate to a simple page first so we have a page context for fetch
  258 |     await page.goto('/');
  259 |     const baseUrl = new URL(page.url()).origin;
  260 | 
  261 |     const result = await testSitemapUrls(page, baseUrl, '/committees/sitemap-committees.xml');
  262 | 
  263 |     if (result.tested === 0 && !STRICT) {
  264 |       test.skip();
  265 |       return;
  266 |     }
  267 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  268 | 
  269 |     console.log(`Tested ${result.tested} URLs from committees sitemap`);
  270 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  271 |   });
  272 | 
  273 |   test('parties sitemap - sample URLs resolve', async ({ page }) => {
  274 |     await page.goto('/');
  275 |     const baseUrl = new URL(page.url()).origin;
  276 | 
  277 |     const result = await testSitemapUrls(page, baseUrl, '/parties/sitemap-parties.xml');
  278 | 
  279 |     if (result.tested === 0 && !STRICT) {
  280 |       test.skip();
  281 |       return;
  282 |     }
  283 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  284 | 
  285 |     console.log(`Tested ${result.tested} URLs from parties sitemap`);
  286 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  287 |   });
  288 | 
  289 |   test('offices sitemap - sample URLs resolve', async ({ page }) => {
  290 |     await page.goto('/');
  291 |     const baseUrl = new URL(page.url()).origin;
  292 | 
  293 |     const result = await testSitemapUrls(page, baseUrl, '/offices/sitemap-offices.xml');
  294 | 
  295 |     if (result.tested === 0 && !STRICT) {
  296 |       test.skip();
  297 |       return;
  298 |     }
  299 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  300 | 
  301 |     console.log(`Tested ${result.tested} URLs from offices sitemap`);
  302 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  303 |   });
  304 | 
  305 |   test('districts sitemap - sample URLs resolve', async ({ page }) => {
  306 |     await page.goto('/');
  307 |     const baseUrl = new URL(page.url()).origin;
  308 | 
  309 |     const result = await testSitemapUrls(page, baseUrl, '/districts/sitemap-districts.xml');
  310 | 
  311 |     if (result.tested === 0 && !STRICT) {
  312 |       test.skip();
  313 |       return;
  314 |     }
  315 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  316 | 
  317 |     console.log(`Tested ${result.tested} URLs from districts sitemap`);
> 318 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
      |                                                                  ^ Error: Errors: Expected 200 for /districts/gu-00/, got 404
  319 |   });
  320 | 
  321 |   test('states sitemap - sample URLs resolve', async ({ page }) => {
  322 |     await page.goto('/');
  323 |     const baseUrl = new URL(page.url()).origin;
  324 | 
  325 |     const result = await testSitemapUrls(page, baseUrl, '/states/sitemap-states.xml');
  326 | 
  327 |     if (result.tested === 0 && !STRICT) {
  328 |       test.skip();
  329 |       return;
  330 |     }
  331 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  332 | 
  333 |     console.log(`Tested ${result.tested} URLs from states sitemap`);
  334 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  335 |   });
  336 | 
  337 |   test('elections sitemap - sample URLs resolve', async ({ page }) => {
  338 |     await page.goto('/');
  339 |     const baseUrl = new URL(page.url()).origin;
  340 | 
  341 |     const result = await testSitemapUrls(page, baseUrl, '/elections/sitemap-elections.xml');
  342 | 
  343 |     if (result.tested === 0 && !STRICT) {
  344 |       test.skip();
  345 |       return;
  346 |     }
  347 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  348 | 
  349 |     console.log(`Tested ${result.tested} URLs from elections sitemap`);
  350 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  351 |   });
  352 | 
  353 | });
  354 | 
```