# 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/routing.spec.ts >> routing: every index link resolves >> /committees/ first-page links all answer 200 or 301
- Location: tests/ui/routing.spec.ts:73:9

# Error details

```
Error: /committees/ links that do not resolve

expect(received).toEqual(expected) // deep equality

- Expected  -  1
+ Received  + 37

- Array []
+ Array [
+   "/committees/63a536ce-a26c-62d9-8b96-3fbb01c34130/ -> 503",
+   "/committees/6551da7f-f6d5-f838-589c-4c7e1dcda74c/ -> 503",
+   "/committees/c01a01a3-6f09-f990-4471-532e8c424e4a/ -> 503",
+   "/committees/9ff2aa18-73cb-cfff-8f63-812edb04be24/ -> 503",
+   "/committees/5f1e13a5-98f9-d324-fdee-8353c6734f4d/ -> 503",
+   "/committees/b1df24d0-bda5-8804-2c71-37bea43cbadf/ -> 503",
+   "/committees/17f189d5-a1c9-bcc8-4294-380cd2e699ee/ -> 503",
+   "/committees/0a0997ec-34a8-12ac-819a-5a2e2c5c25bb/ -> 503",
+   "/committees/9db884e1-45c5-4040-f4d9-b19380292050/ -> 503",
+   "/committees/381030ce-3d08-e1a2-08a0-9195542ad0f7/ -> 503",
+   "/committees/169db133-7ab2-7f22-8178-94340fe9ab87/ -> 503",
+   "/committees/ad77a4d6-f483-392f-106e-eeffdaa3a7f9/ -> 503",
+   "/committees/a6d0fdc0-784c-ffff-60e6-c3d3e49dda1b/ -> 503",
+   "/committees/a3c9354c-478e-cf16-5617-6f3a70c743e1/ -> 503",
+   "/committees/b9776ddc-ee90-e78a-56c4-ea2d43459211/ -> 503",
+   "/committees/e2a7b1d4-26d4-6195-4059-bed357a7fd54/ -> 503",
+   "/committees/23c59291-b328-cf4f-ef63-3d98448d1dfe/ -> 503",
+   "/committees/b4684465-d7d7-80ea-eea3-6fbf5822d664/ -> 503",
+   "/committees/208ba981-e516-3a69-efeb-bdb205426404/ -> 503",
+   "/committees/3f89df19-be0c-766d-c4d4-f0f2c19c4246/ -> 503",
+   "/committees/f8ba06db-d523-60e1-8c96-a4cead3487b6/ -> 503",
+   "/committees/486952d4-c3ba-d108-0713-d2e3a7088d2a/ -> 503",
+   "/committees/c92c5145-1ee8-003b-5d39-6c73ecef9ce3/ -> 503",
+   "/committees/e947e90e-629f-2ea5-e2c5-88e92e089529/ -> 503",
+   "/committees/fdcb2d2d-0bab-d839-4df1-545017d998ac/ -> 503",
+   "/committees/babdffca-908b-dca6-97d3-ffbcc9023ff1/ -> 503",
+   "/committees/4832e7db-d077-4039-c114-f1d2f31c7ad3/ -> 503",
+   "/committees/4f08add9-92f3-cc88-9108-343ef7b67d7f/ -> 503",
+   "/committees/2a3a0a4c-9ea7-2759-aaab-3c3a0a969ff9/ -> 503",
+   "/committees/13a4167b-be4b-9855-71b9-a691c38ea927/ -> 503",
+   "/committees/dc420265-5a31-bc82-9936-95cc075ea830/ -> 503",
+   "/committees/f53c5b7a-aaaf-3b30-af15-de01c4bf1234/ -> 503",
+   "/committees/9be0a188-23bb-b33d-6c6a-ef7243b5f511/ -> 503",
+   "/committees/e644cd30-d098-358d-eddb-c5d606f59281/ -> 503",
+   "/committees/3d292b49-f159-83e2-24d5-6d2e2f349dfa/ -> 503",
+ ]
```

# Page snapshot

```yaml
- generic [active] [ref=e1]:
  - link "← Back to Home" [ref=e2] [cursor=pointer]:
    - /url: /
  - banner [ref=e3]:
    - heading "Committees" [level=1] [ref=e4]
    - paragraph [ref=e5]: PACs, campaign committees, and party committees
  - generic [ref=e6]:
    - generic [ref=e7]:
      - generic [ref=e8]: Not signed in
      - generic [ref=e10]:
        - link "Log in" [ref=e11] [cursor=pointer]:
          - /url: /outpost.goauthentik.io/start?rd=http%3A%2F%2Fpreview-us-elect-info.electinfo.svc.cluster.local%2Fcommittees%2F
        - link "Create an account" [ref=e12] [cursor=pointer]:
          - /url: /signin/register?rd=http%3A%2F%2Fpreview-us-elect-info.electinfo.svc.cluster.local%2Fcommittees%2F
    - toolbar "Member tools" [ref=e13]:
      - button "All cycles (Sign in to use the cycle facet)" [disabled] [ref=e14] [cursor=pointer]:
        - generic [ref=e18]: All cycles
      - button "Graph (Sign in to use Graph)" [disabled] [ref=e21] [cursor=pointer]:
        - generic [ref=e30]: Graph
  - generic [ref=e33]:
    - generic [ref=e34]:
      - generic [ref=e35]:
        - combobox "Search entities" [ref=e36]
        - status [ref=e37]
      - button "Search" [ref=e38] [cursor=pointer]
    - generic [ref=e39]:
      - generic [ref=e40]: "Committee Type:"
      - combobox "Committee Type:" [ref=e41] [cursor=pointer]:
        - option "All" [selected]
        - option "House Campaign"
        - option "Senate Campaign"
        - option "Presidential Campaign"
        - option "PAC - Nonqualified"
        - option "PAC - Qualified"
        - option "Super PAC"
        - option "Party - Nonqualified"
        - option "Party - Qualified"
        - option "National Party"
        - option "Independent Expenditure"
        - option "Electioneering"
        - option "Communication Cost"
        - option "Delegate Committee"
        - option "Single Candidate"
        - option "PAC with Non-Contribution"
        - option "PAC without Non-Contribution"
    - generic [ref=e42]:
      - heading "All Committees" [level=3] [ref=e44]
      - generic [ref=e45]:
        - 'link "ACTBLUE Committee - $30.2B total dollars Party Affinity – DEM: 89% REP: 11%" [ref=e46] [cursor=pointer]':
          - /url: /committees/6873ff80-3836-afa5-b968-de82aa058140/
          - generic [ref=e47]: ACTBLUE
          - generic [ref=e48]: Committee - $30.2B total dollars
          - generic [ref=e49]: "Party Affinity – DEM: 89% REP: 11%"
        - 'link "REPUBLICAN NATIONAL COMMITTEE Committee - $12.0B total dollars Party Affinity – DEM: 16% REP: 84%" [ref=e50] [cursor=pointer]':
          - /url: /committees/bd220b34-22b0-a55e-6e2d-2204c22f84eb/
          - generic [ref=e51]: REPUBLICAN NATIONAL COMMITTEE
          - generic [ref=e52]: Committee - $12.0B total dollars
          - generic [ref=e53]: "Party Affinity – DEM: 16% REP: 84%"
        - 'link "WINRED Committee - $12.0B total dollars Party Affinity – DEM: 3% REP: 97%" [ref=e54] [cursor=pointer]':
          - /url: /committees/21851d9c-ee74-f5e3-f71b-7c4bd398926f/
          - generic [ref=e55]: WINRED
          - generic [ref=e56]: Committee - $12.0B total dollars
          - generic [ref=e57]: "Party Affinity – DEM: 3% REP: 97%"
        - 'link "DNC SERVICES CORP / DEMOCRATIC NATIONAL COMMITTEE Committee - $9.0B total dollars Party Affinity – DEM: 81% REP: 19%" [ref=e58] [cursor=pointer]':
          - /url: /committees/a75a9110-f1db-a945-39a8-7503ed3c04da/
          - generic [ref=e59]: DNC SERVICES CORP / DEMOCRATIC NATIONAL COMMITTEE
          - generic [ref=e60]: Committee - $9.0B total dollars
          - generic [ref=e61]: "Party Affinity – DEM: 81% REP: 19%"
        - 'link "NRCC Committee - $6.2B total dollars Party Affinity – DEM: 13% REP: 87%" [ref=e62] [cursor=pointer]':
          - /url: /committees/c9e63675-f56a-6d23-9bf7-7407e647fa4a/
          - generic [ref=e63]: NRCC
          - generic [ref=e64]: Committee - $6.2B total dollars
          - generic [ref=e65]: "Party Affinity – DEM: 13% REP: 87%"
        - 'link "DCCC Committee - $6.0B total dollars Party Affinity – DEM: 89% REP: 11%" [ref=e66] [cursor=pointer]':
          - /url: /committees/0c1dc29f-4c16-d088-4721-a10b1634a797/
          - generic [ref=e67]: DCCC
          - generic [ref=e68]: Committee - $6.0B total dollars
          - generic [ref=e69]: "Party Affinity – DEM: 89% REP: 11%"
        - 'link "NRSC Committee - $5.6B total dollars Party Affinity – DEM: 21% REP: 79%" [ref=e70] [cursor=pointer]':
          - /url: /committees/68314d7b-b990-24f2-be2c-9d112ecc1d37/
          - generic [ref=e71]: NRSC
          - generic [ref=e72]: Committee - $5.6B total dollars
          - generic [ref=e73]: "Party Affinity – DEM: 21% REP: 79%"
        - 'link "DSCC Committee - $5.0B total dollars Party Affinity – DEM: 79% REP: 21%" [ref=e74] [cursor=pointer]':
          - /url: /committees/f6fe33bc-bee2-9748-eb6a-c5be0956fb25/
          - generic [ref=e75]: DSCC
          - generic [ref=e76]: Committee - $5.0B total dollars
          - generic [ref=e77]: "Party Affinity – DEM: 79% REP: 21%"
        - link "HARRIS VICTORY FUND Committee - $4.0B total dollars" [ref=e78] [cursor=pointer]:
          - /url: /committees/d76ca440-e457-f70f-f79c-379015bd0f9a/
          - generic [ref=e79]: HARRIS VICTORY FUND
          - generic [ref=e80]: Committee - $4.0B total dollars
        - 'link "SLF PAC Committee - $3.5B total dollars Party Affinity – DEM: 27% REP: 73%" [ref=e81] [cursor=pointer]':
          - /url: /committees/e924b6cf-d95b-f392-714c-9be43e5ee2f1/
          - generic [ref=e82]: SLF PAC
          - generic [ref=e83]: Committee - $3.5B total dollars
          - generic [ref=e84]: "Party Affinity – DEM: 27% REP: 73%"
        - 'link "SMP Committee - $3.5B total dollars Party Affinity – DEM: 79% REP: 21%" [ref=e85] [cursor=pointer]':
          - /url: /committees/3e4074a8-9fb9-4bc3-9785-fd450a1f7ca4/
          - generic [ref=e86]: SMP
          - generic [ref=e87]: Committee - $3.5B total dollars
          - generic [ref=e88]: "Party Affinity – DEM: 79% REP: 21%"
        - link "TRUMP MAKE AMERICA GREAT AGAIN COMMITTEE Committee - $2.5B total dollars" [ref=e89] [cursor=pointer]:
          - /url: /committees/a22146b1-2c47-a336-fceb-df9f331c8cb9/
          - generic [ref=e90]: TRUMP MAKE AMERICA GREAT AGAIN COMMITTEE
          - generic [ref=e91]: Committee - $2.5B total dollars
        - 'link "CLF Committee - $2.2B total dollars Party Affinity – DEM: 34% REP: 66%" [ref=e92] [cursor=pointer]':
          - /url: /committees/d25fbf59-05dc-bcff-e907-ecc47fb1f775/
          - generic [ref=e93]: CLF
          - generic [ref=e94]: Committee - $2.2B total dollars
          - generic [ref=e95]: "Party Affinity – DEM: 34% REP: 66%"
        - 'link "HMP Committee - $1.9B total dollars Party Affinity – DEM: 82% REP: 18%" [ref=e96] [cursor=pointer]':
          - /url: /committees/36564e87-7c2c-d1ab-53fe-95cd6312099a/
          - generic [ref=e97]: HMP
          - generic [ref=e98]: Committee - $1.9B total dollars
          - generic [ref=e99]: "Party Affinity – DEM: 82% REP: 18%"
        - 'link "FF PAC Committee - $1.5B total dollars Party Affinity – DEM: 79% REP: 21%" [ref=e100] [cursor=pointer]':
          - /url: /committees/16e80634-d3c7-b266-a589-f2e8932c117d/
          - generic [ref=e101]: FF PAC
          - generic [ref=e102]: Committee - $1.5B total dollars
          - generic [ref=e103]: "Party Affinity – DEM: 79% REP: 21%"
        - 'link "EMILYS LIST Committee - $1.3B total dollars Party Affinity – DEM: 82% REP: 18%" [ref=e104] [cursor=pointer]':
          - /url: /committees/63a536ce-a26c-62d9-8b96-3fbb01c34130/
          - generic [ref=e105]: EMILYS LIST
          - generic [ref=e106]: Committee - $1.3B total dollars
          - generic [ref=e107]: "Party Affinity – DEM: 82% REP: 18%"
        - 'link "NATIONAL REPUBLICAN CONGRESSIONAL COMMITTEE CONTRIBUTIONS Committee - $1.3B total dollars Party Affinity – DEM: 24% REP: 76%" [ref=e108] [cursor=pointer]':
          - /url: /committees/6551da7f-f6d5-f838-589c-4c7e1dcda74c/
          - generic [ref=e109]: NATIONAL REPUBLICAN CONGRESSIONAL COMMITTEE CONTRIBUTIONS
          - generic [ref=e110]: Committee - $1.3B total dollars
          - generic [ref=e111]: "Party Affinity – DEM: 24% REP: 76%"
        - 'link "SEIU COPE (SERVICE EMPLOYEES INTERNATIONAL UNION COMMITTEE ON POLITICAL EDUCATION) Committee - $1.2B total dollars Party Affinity – DEM: 76% REP: 24%" [ref=e112] [cursor=pointer]':
          - /url: /committees/c01a01a3-6f09-f990-4471-532e8c424e4a/
          - generic [ref=e113]: SEIU COPE (SERVICE EMPLOYEES INTERNATIONAL UNION COMMITTEE ON POLITICAL EDUCATION)
          - generic [ref=e114]: Committee - $1.2B total dollars
          - generic [ref=e115]: "Party Affinity – DEM: 76% REP: 24%"
        - link "TRUMP NATIONAL COMMITTEE JFC, INC. Committee - $1.1B total dollars" [ref=e116] [cursor=pointer]:
          - /url: /committees/9ff2aa18-73cb-cfff-8f63-812edb04be24/
          - generic [ref=e117]: TRUMP NATIONAL COMMITTEE JFC, INC.
          - generic [ref=e118]: Committee - $1.1B total dollars
        - 'link "NEVER SURRENDER, INC. Committee - $1.1B total dollars Party Affinity – DEM: 15% REP: 85%" [ref=e119] [cursor=pointer]':
          - /url: /committees/5f1e13a5-98f9-d324-fdee-8353c6734f4d/
          - generic [ref=e120]: NEVER SURRENDER, INC.
          - generic [ref=e121]: Committee - $1.1B total dollars
          - generic [ref=e122]: "Party Affinity – DEM: 15% REP: 85%"
        - link "HILLARY VICTORY FUND Committee - $1.1B total dollars" [ref=e123] [cursor=pointer]:
          - /url: /committees/b1df24d0-bda5-8804-2c71-37bea43cbadf/
          - generic [ref=e124]: HILLARY VICTORY FUND
          - generic [ref=e125]: Committee - $1.1B total dollars
        - link "TRUMP VICTORY Committee - $1.0B total dollars" [ref=e126] [cursor=pointer]:
          - /url: /committees/17f189d5-a1c9-bcc8-4294-380cd2e699ee/
          - generic [ref=e127]: TRUMP VICTORY
          - generic [ref=e128]: Committee - $1.0B total dollars
        - 'link "PRIORITIES USA ACTION Committee - $995.6M total dollars Party Affinity – DEM: 85% REP: 15%" [ref=e129] [cursor=pointer]':
          - /url: /committees/0a0997ec-34a8-12ac-819a-5a2e2c5c25bb/
          - generic [ref=e130]: PRIORITIES USA ACTION
          - generic [ref=e131]: Committee - $995.6M total dollars
          - generic [ref=e132]: "Party Affinity – DEM: 85% REP: 15%"
        - 'link "ROMNEY VICTORY, INC. Committee - $987.1M total dollars Party Affinity – DEM: 34% REP: 66%" [ref=e133] [cursor=pointer]':
          - /url: /committees/9db884e1-45c5-4040-f4d9-b19380292050/
          - generic [ref=e134]: ROMNEY VICTORY, INC.
          - generic [ref=e135]: Committee - $987.1M total dollars
          - generic [ref=e136]: "Party Affinity – DEM: 34% REP: 66%"
        - 'link "MAKE AMERICA GREAT AGAIN INC. Committee - $973.6M total dollars Party Affinity – DEM: 57% REP: 43%" [ref=e137] [cursor=pointer]':
          - /url: /committees/381030ce-3d08-e1a2-08a0-9195542ad0f7/
          - generic [ref=e138]: MAKE AMERICA GREAT AGAIN INC.
          - generic [ref=e139]: Committee - $973.6M total dollars
          - generic [ref=e140]: "Party Affinity – DEM: 57% REP: 43%"
        - 'link "OBAMA VICTORY FUND 2012 Committee - $918.8M total dollars Party Affinity – DEM: 89% REP: 11%" [ref=e141] [cursor=pointer]':
          - /url: /committees/169db133-7ab2-7f22-8178-94340fe9ab87/
          - generic [ref=e142]: OBAMA VICTORY FUND 2012
          - generic [ref=e143]: Committee - $918.8M total dollars
          - generic [ref=e144]: "Party Affinity – DEM: 89% REP: 11%"
        - link "REPUBLICAN NATIONAL COMMITTEE - CONTRIBUTIONS (AKA REPUBLICAN NATIONAL FINANCE COMMITTEE Committee - $912.2M total dollars" [ref=e145] [cursor=pointer]:
          - /url: /committees/ad77a4d6-f483-392f-106e-eeffdaa3a7f9/
          - generic [ref=e146]: REPUBLICAN NATIONAL COMMITTEE - CONTRIBUTIONS (AKA REPUBLICAN NATIONAL FINANCE COMMITTEE
          - generic [ref=e147]: Committee - $912.2M total dollars
        - 'link "REPUBLICAN PARTY OF FLORIDA Committee - $847.1M total dollars Party Affinity – DEM: 13% REP: 87%" [ref=e148] [cursor=pointer]':
          - /url: /committees/a6d0fdc0-784c-ffff-60e6-c3d3e49dda1b/
          - generic [ref=e149]: REPUBLICAN PARTY OF FLORIDA
          - generic [ref=e150]: Committee - $847.1M total dollars
          - generic [ref=e151]: "Party Affinity – DEM: 13% REP: 87%"
        - 'link "TRUMP SAVE AMERICA JOINT FUNDRAISING COMMITTEE Committee - $822.8M total dollars Party Affinity – DEM: 15% REP: 85%" [ref=e152] [cursor=pointer]':
          - /url: /committees/a3c9354c-478e-cf16-5617-6f3a70c743e1/
          - generic [ref=e153]: TRUMP SAVE AMERICA JOINT FUNDRAISING COMMITTEE
          - generic [ref=e154]: Committee - $822.8M total dollars
          - generic [ref=e155]: "Party Affinity – DEM: 15% REP: 85%"
        - 'link "NATIONAL REPUBLICAN SENATORIAL COMMITTEE - CONTRIBUTIONS * Committee - $810.1M total dollars Party Affinity – DEM: 16% REP: 84%" [ref=e156] [cursor=pointer]':
          - /url: /committees/b9776ddc-ee90-e78a-56c4-ea2d43459211/
          - generic [ref=e157]: NATIONAL REPUBLICAN SENATORIAL COMMITTEE - CONTRIBUTIONS *
          - generic [ref=e158]: Committee - $810.1M total dollars
          - generic [ref=e159]: "Party Affinity – DEM: 16% REP: 84%"
        - 'link "AMERICANS FOR PROSPERITY ACTION, INC. (AFP ACTION) DBA CVA ACTION AND DBA LIBRE ACTION Committee - $799.2M total dollars Party Affinity – DEM: 23% REP: 77%" [ref=e160] [cursor=pointer]':
          - /url: /committees/e2a7b1d4-26d4-6195-4059-bed357a7fd54/
          - generic [ref=e161]: AMERICANS FOR PROSPERITY ACTION, INC. (AFP ACTION) DBA CVA ACTION AND DBA LIBRE ACTION
          - generic [ref=e162]: Committee - $799.2M total dollars
          - generic [ref=e163]: "Party Affinity – DEM: 23% REP: 77%"
        - 'link "AMERICA PAC Committee - $793.0M total dollars Party Affinity – DEM: 16% REP: 84%" [ref=e164] [cursor=pointer]':
          - /url: /committees/23c59291-b328-cf4f-ef63-3d98448d1dfe/
          - generic [ref=e165]: AMERICA PAC
          - generic [ref=e166]: Committee - $793.0M total dollars
          - generic [ref=e167]: "Party Affinity – DEM: 16% REP: 84%"
        - 'link "MOVEON.ORG POLITICAL ACTION Committee - $792.3M total dollars Party Affinity – DEM: 78% REP: 22%" [ref=e168] [cursor=pointer]':
          - /url: /committees/b4684465-d7d7-80ea-eea3-6fbf5822d664/
          - generic [ref=e169]: MOVEON.ORG POLITICAL ACTION
          - generic [ref=e170]: Committee - $792.3M total dollars
          - generic [ref=e171]: "Party Affinity – DEM: 78% REP: 22%"
        - 'link "CLUB FOR GROWTH ACTION Committee - $742.1M total dollars Party Affinity – DEM: 60% REP: 40%" [ref=e172] [cursor=pointer]':
          - /url: /committees/208ba981-e516-3a69-efeb-bdb205426404/
          - generic [ref=e173]: CLUB FOR GROWTH ACTION
          - generic [ref=e174]: Committee - $742.1M total dollars
          - generic [ref=e175]: "Party Affinity – DEM: 60% REP: 40%"
        - link "TRUMP 47 COMMITTEE, INC. Committee - $734.3M total dollars" [ref=e176] [cursor=pointer]:
          - /url: /committees/3f89df19-be0c-766d-c4d4-f0f2c19c4246/
          - generic [ref=e177]: TRUMP 47 COMMITTEE, INC.
          - generic [ref=e178]: Committee - $734.3M total dollars
        - 'link "FAIRSHAKE Committee - $712.7M total dollars Party Affinity – DEM: 53% REP: 47%" [ref=e179] [cursor=pointer]':
          - /url: /committees/f8ba06db-d523-60e1-8c96-a4cead3487b6/
          - generic [ref=e180]: FAIRSHAKE
          - generic [ref=e181]: Committee - $712.7M total dollars
          - generic [ref=e182]: "Party Affinity – DEM: 53% REP: 47%"
        - 'link "AB PAC Committee - $700.5M total dollars Party Affinity – DEM: 74% REP: 26%" [ref=e183] [cursor=pointer]':
          - /url: /committees/486952d4-c3ba-d108-0713-d2e3a7088d2a/
          - generic [ref=e184]: AB PAC
          - generic [ref=e185]: Committee - $700.5M total dollars
          - generic [ref=e186]: "Party Affinity – DEM: 74% REP: 26%"
        - 'link "AMERICAN CROSSROADS Committee - $678.7M total dollars Party Affinity – DEM: 30% REP: 70%" [ref=e187] [cursor=pointer]':
          - /url: /committees/c92c5145-1ee8-003b-5d39-6c73ecef9ce3/
          - generic [ref=e188]: AMERICAN CROSSROADS
          - generic [ref=e189]: Committee - $678.7M total dollars
          - generic [ref=e190]: "Party Affinity – DEM: 30% REP: 70%"
        - 'link "WINSENATE Committee - $670.2M total dollars Party Affinity – DEM: 75% REP: 25%" [ref=e191] [cursor=pointer]':
          - /url: /committees/e947e90e-629f-2ea5-e2c5-88e92e089529/
          - generic [ref=e192]: WINSENATE
          - generic [ref=e193]: Committee - $670.2M total dollars
          - generic [ref=e194]: "Party Affinity – DEM: 75% REP: 25%"
        - 'link "STUDENT UNION Committee - $617.1M total dollars Party Affinity – DEM: 74% REP: 26%" [ref=e195] [cursor=pointer]':
          - /url: /committees/fdcb2d2d-0bab-d839-4df1-545017d998ac/
          - generic [ref=e196]: STUDENT UNION
          - generic [ref=e197]: Committee - $617.1M total dollars
          - generic [ref=e198]: "Party Affinity – DEM: 74% REP: 26%"
        - 'link "DEMOCRATIC EXECUTIVE COMMITTEE OF FLORIDA Committee - $602.2M total dollars Party Affinity – DEM: 88% REP: 12%" [ref=e199] [cursor=pointer]':
          - /url: /committees/babdffca-908b-dca6-97d3-ffbcc9023ff1/
          - generic [ref=e200]: DEMOCRATIC EXECUTIVE COMMITTEE OF FLORIDA
          - generic [ref=e201]: Committee - $602.2M total dollars
          - generic [ref=e202]: "Party Affinity – DEM: 88% REP: 12%"
        - 'link "LCV VICTORY FUND Committee - $584.3M total dollars Party Affinity – DEM: 78% REP: 22%" [ref=e203] [cursor=pointer]':
          - /url: /committees/4832e7db-d077-4039-c114-f1d2f31c7ad3/
          - generic [ref=e204]: LCV VICTORY FUND
          - generic [ref=e205]: Committee - $584.3M total dollars
          - generic [ref=e206]: "Party Affinity – DEM: 78% REP: 22%"
        - 'link "PROGRESSIVE TURNOUT PROJECT Committee - $583.3M total dollars Party Affinity – DEM: 79% REP: 21%" [ref=e207] [cursor=pointer]':
          - /url: /committees/4f08add9-92f3-cc88-9108-343ef7b67d7f/
          - generic [ref=e208]: PROGRESSIVE TURNOUT PROJECT
          - generic [ref=e209]: Committee - $583.3M total dollars
          - generic [ref=e210]: "Party Affinity – DEM: 79% REP: 21%"
        - 'link "RESTORATION OF AMERICA PAC Committee - $569.3M total dollars Party Affinity – DEM: 17% REP: 83%" [ref=e211] [cursor=pointer]':
          - /url: /committees/2a3a0a4c-9ea7-2759-aaab-3c3a0a969ff9/
          - generic [ref=e212]: RESTORATION OF AMERICA PAC
          - generic [ref=e213]: Committee - $569.3M total dollars
          - generic [ref=e214]: "Party Affinity – DEM: 17% REP: 83%"
        - 'link "AMERICAN FEDERATION OF STATE COUNTY & MUNICIPAL EMPLOYEES P E O P L E Committee - $568.1M total dollars Party Affinity – DEM: 78% REP: 22%" [ref=e215] [cursor=pointer]':
          - /url: /committees/13a4167b-be4b-9855-71b9-a691c38ea927/
          - generic [ref=e216]: AMERICAN FEDERATION OF STATE COUNTY & MUNICIPAL EMPLOYEES P E O P L E
          - generic [ref=e217]: Committee - $568.1M total dollars
          - generic [ref=e218]: "Party Affinity – DEM: 78% REP: 22%"
        - 'link "MICHIGAN DEMOCRATIC STATE CENTRAL COMMITTEE Committee - $563.8M total dollars Party Affinity – DEM: 88% REP: 12%" [ref=e219] [cursor=pointer]':
          - /url: /committees/dc420265-5a31-bc82-9936-95cc075ea830/
          - generic [ref=e220]: MICHIGAN DEMOCRATIC STATE CENTRAL COMMITTEE
          - generic [ref=e221]: Committee - $563.8M total dollars
          - generic [ref=e222]: "Party Affinity – DEM: 88% REP: 12%"
        - 'link "CALIFORNIA REPUBLICAN PARTY FEDERAL ACCT. Committee - $548.8M total dollars Party Affinity – DEM: 7% REP: 93%" [ref=e223] [cursor=pointer]':
          - /url: /committees/f53c5b7a-aaaf-3b30-af15-de01c4bf1234/
          - generic [ref=e224]: CALIFORNIA REPUBLICAN PARTY FEDERAL ACCT.
          - generic [ref=e225]: Committee - $548.8M total dollars
          - generic [ref=e226]: "Party Affinity – DEM: 7% REP: 93%"
        - 'link "OHIO DEMOCRATIC PARTY - FEDERAL Committee - $540.2M total dollars Party Affinity – DEM: 85% REP: 15%" [ref=e227] [cursor=pointer]':
          - /url: /committees/9be0a188-23bb-b33d-6c6a-ef7243b5f511/
          - generic [ref=e228]: OHIO DEMOCRATIC PARTY - FEDERAL
          - generic [ref=e229]: Committee - $540.2M total dollars
          - generic [ref=e230]: "Party Affinity – DEM: 85% REP: 15%"
        - 'link "DEMOCRATIC PARTY OF WISCONSIN FEDERAL Committee - $531.1M total dollars Party Affinity – DEM: 91% REP: 9%" [ref=e231] [cursor=pointer]':
          - /url: /committees/e644cd30-d098-358d-eddb-c5d606f59281/
          - generic [ref=e232]: DEMOCRATIC PARTY OF WISCONSIN FEDERAL
          - generic [ref=e233]: Committee - $531.1M total dollars
          - generic [ref=e234]: "Party Affinity – DEM: 91% REP: 9%"
        - 'link "SAVE AMERICA Committee - $530.3M total dollars Party Affinity – DEM: 24% REP: 76%" [ref=e235] [cursor=pointer]':
          - /url: /committees/3d292b49-f159-83e2-24d5-6d2e2f349dfa/
          - generic [ref=e236]: SAVE AMERICA
          - generic [ref=e237]: Committee - $530.3M total dollars
          - generic [ref=e238]: "Party Affinity – DEM: 24% REP: 76%"
      - generic [ref=e239]:
        - generic [ref=e240]: Showing 1-50
        - generic [ref=e241]:
          - button "First" [disabled] [ref=e242]
          - button "Prev" [disabled] [ref=e243]
          - button "1" [ref=e244] [cursor=pointer]
          - button "Next" [ref=e245] [cursor=pointer]
  - main [ref=e246]
```

# Test source

```ts
  1   | import { test, expect, APIRequestContext } from '@playwright/test';
  2   | import { canonicalPath, getRandomItems, premiumGated, toRelativePath } from './helpers';
  3   | 
  4   | /*
  5   |  * Routing coverage across every collection (electinfo/rundeck#700, ops#514).
  6   |  *
  7   |  * What slipped past the existing specs:
  8   |  *   - the preview nginx lacked the /politicians/ -> /candidates/ rewrite the
  9   |  *     production config has (sites#162) -- only 3 random index links were followed;
  10  |  *   - unknown paths fall through to the Payload slug lookup, which answers
  11  |  *     400/500 instead of 404.
  12  |  */
  13  | 
  14  | const ALIASES = process.env.EXPECT_ALIASES === '1';
  15  | 
  16  | /** Collections whose sitemap lists canonical URLs (rundeck PagePaths Sitemaps + CyclePages). */
  17  | const SITEMAP_COLLECTIONS = ['candidates', 'committees', 'parties', 'offices', 'districts', 'states', 'elections'];
  18  | 
  19  | /** Indexes whose first results page lists entity links (.entity-search-result). */
  20  | // (/states/ lists map chips — its sitemap test covers it; /districts/ uses the
  21  | // shared EntityIndex and lists .entity-search-result directly, so it is included here)
  22  | const LINKED_INDEXES = ['/candidates/', '/committees/', '/parties/', '/offices/', '/districts/', '/elections/', '/employers/', '/vendors/'];
  23  | 
  24  | const locs = (xml: string) => [...xml.matchAll(/<loc>([^<]+)<\/loc>/g)].map(m => m[1]);
  25  | 
  26  | /** Canonical page URLs from a collection's sitemap, following one level of sitemap index. */
  27  | async function sitemapLocs(request: APIRequestContext, collection: string): Promise<string[]> {
  28  |   const path = `/${collection}/sitemap-${collection}.xml`;
  29  |   const res = await request.get(path);
  30  |   expect(res.status(), `${path} should answer 200`).toBe(200);
  31  |   const xml = await res.text();
  32  |   if (!xml.includes('<sitemapindex')) return locs(xml);
  33  |   const [child] = getRandomItems(locs(xml), 1, `child:${path}`);
  34  |   const childPath = toRelativePath(child);
  35  |   const childRes = await request.get(childPath);
  36  |   expect(childRes.status(), `${childPath} should answer 200`).toBe(200);
  37  |   return locs(await childRes.text());
  38  | }
  39  | 
  40  | test.describe('routing: canonical URLs per collection', () => {
  41  |   test.skip(!ALIASES, 'Set EXPECT_ALIASES=1 against a target with published page paths');
  42  | 
  43  |   for (const collection of SITEMAP_COLLECTIONS) {
  44  |     test(`${collection}: sitemap URLs serve their page with rel=canonical = the sitemap URL`, async ({ request }) => {
  45  |       // Entity pages only: a sitemap may also list the collection's index (/elections/)
  46  |       const entityLocs = (await sitemapLocs(request, collection)).filter(l => toRelativePath(l) !== `/${collection}/`);
  47  |       const sample = getRandomItems(entityLocs, 3);
  48  |       expect(sample.length, `${collection} sitemap should list URLs`).toBeGreaterThan(0);
  49  |       for (const loc of sample) {
  50  |         const path = toRelativePath(loc);
  51  |         const res = await request.get(path, { maxRedirects: 0 });
  52  |         expect(res.status(), `${path} (from the ${collection} sitemap) should answer 200`).toBe(200);
  53  |         expect(canonicalPath(await res.text()), `${path} rel=canonical`).toBe(path);
  54  |       }
  55  |     });
  56  |   }
  57  | 
  58  | 
  59  |   test('party badge links by FEC code redirect to the party page', async ({ request }) => {
  60  |     // us.elect.news links parties as /parties/<code>/ (sites#164)
  61  |     for (const code of ['rep', 'dem']) {
  62  |       const res = await request.get(`/parties/${code}/`, { maxRedirects: 0 });
  63  |       expect(res.status(), `/parties/${code}/ should redirect permanently`).toBe(301);
  64  |       const target = res.headers()['location'] ?? '';
  65  |       const page = await request.get(target, { maxRedirects: 0 });
  66  |       expect(page.status(), `/parties/${code}/ -> ${target} should answer 200`).toBe(200);
  67  |     }
  68  |   });
  69  | });
  70  | 
  71  | test.describe('routing: every index link resolves', () => {
  72  |   for (const index of LINKED_INDEXES) {
  73  |     test(`${index} first-page links all answer 200 or 301`, async ({ page, request }) => {
  74  |       test.setTimeout(120000);
  75  |       const res = await page.goto(index);
  76  |       expect(res?.status(), `${index} should answer 200`).toBe(200);
  77  |       await expect(page.locator('.entity-search-result').first(), `${index} should list results`).toBeVisible({ timeout: 15000 });
  78  |       const hrefs = (await page.locator('.entity-search-result').evaluateAll(els => els.map(e => e.getAttribute('href'))))
  79  |         .filter((h): h is string => !!h)
  80  |         .map(toRelativePath);
  81  |       const broken: string[] = [];
  82  |       for (const href of [...new Set(hrefs)]) {
  83  |         const r = await request.get(href, { maxRedirects: 0 });
  84  |         if (r.status() !== 200 && r.status() !== 301) broken.push(`${href} -> ${r.status()}`);
  85  |       }
> 86  |       expect(broken, `${index} links that do not resolve`).toEqual([]);
      |                                                            ^ Error: /committees/ links that do not resolve
  87  |     });
  88  |   }
  89  | });
  90  | 
  91  | test.describe('routing: unknown addresses', () => {
  92  |   test('an unknown entity path answers 404', async ({ request }) => {
  93  |     // A miss in /_resolve (or the API being unavailable) ends in nginx's own
  94  |     // 404. It used to fall through to Payload's slug-lookup, which answered
  95  |     // 400/500 (electinfo/sites#218). Only the alias-routed collections apply:
  96  |     // leaf collections are covered below.
  97  |     for (const path of ['/candidates/no-such-entity-zz/', '/committees/no-such-entity-zz/']) {
  98  |       const res = await request.get(path, { maxRedirects: 0 });
  99  |       expect(res.status(), `${path} should answer 404`).toBe(404);
  100 |     }
  101 |   });
  102 | 
  103 |   test('an unknown leaf entity path serves the collection shell', async ({ request }) => {
  104 |     // Leaf collections (individuals, employers, vendors, blocks, precincts,
  105 |     // tracts) render client-side from the baked collection shell (sites#209),
  106 |     // so nginx answers every subpath with that shell and the runtime reports
  107 |     // a missing entity itself. There is no server-side 404 to expect here.
  108 |     for (const col of ['individuals', 'employers', 'vendors', 'blocks', 'precincts', 'tracts']) {
  109 |       // A premium section closed to this visitor answers sign-in or 403 instead (auth.spec.ts).
  110 |       if (await premiumGated(request, `/${col}/`)) continue;
  111 |       const res = await request.get(`/${col}/no-such-entity-zz/`, { maxRedirects: 0 });
  112 |       expect(res.status(), `/${col}/no-such-entity-zz/ should serve the shell`).toBe(200);
  113 |       expect(res.headers()['content-type'] ?? '', `/${col}/ shell is HTML`).toContain('text/html');
  114 |     }
  115 |   });
  116 | });
  117 | 
```