# 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 >> committees sitemap - sample URLs resolve
- Location: tests/ui/sitemap.spec.ts:229:7

# Error details

```
Error: Errors: /committees/sitemap-committees.xml lists 83545 URLs (limit 50000)

expect(received).toHaveLength(expected)

Expected length: 0
Received length: 1
Received array:  ["/committees/sitemap-committees.xml lists 83545 URLs (limit 50000)"]
```

# Page snapshot

```yaml
- generic [active] [ref=f5e1]:
  - banner [ref=f5e2]:
    - heading "FRIENDS OF JOHN BARRASSO" [level=1] [ref=f5e3]
    - paragraph [ref=f5e4]: Senate Campaign
    - paragraph [ref=f5e5]: "FEC ID: C00436386"
  - generic [ref=f5e6]:
    - heading "Overview" [level=2] [ref=f5e7]
    - generic [ref=f5e8]:
      - term [ref=f5e9]: Committee Type
      - definition [ref=f5e10]: Senate Campaign
      - term [ref=f5e11]: Designation
      - definition [ref=f5e12]: P
      - term [ref=f5e13]: Party Affiliation
      - definition [ref=f5e14]:
        - link "Republican Party" [ref=f5e15] [cursor=pointer]:
          - /url: https://us.elect.info/parties/republican-party/
      - term [ref=f5e16]: Treasurer
      - definition [ref=f5e17]: MARK VINCENT
      - term [ref=f5e18]: Location
      - definition [ref=f5e19]:
        - text: CASPER,
        - link "Wyoming" [ref=f5e20] [cursor=pointer]:
          - /url: https://us.elect.info/states/wyoming/
        - text: "82605"
      - term [ref=f5e21]: Active Cycles
      - definition [ref=f5e22]:
        - link "2016" [ref=f5e23] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2016/
        - text: ","
        - link "2018" [ref=f5e24] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2018/
        - text: ","
        - link "2020" [ref=f5e25] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2020/
        - text: ","
        - link "2022" [ref=f5e26] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2022/
        - text: ","
        - link "2008" [ref=f5e27] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2008/
        - text: ","
        - link "2024" [ref=f5e28] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2024/
        - text: ","
        - link "2010" [ref=f5e29] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2010/
        - text: ","
        - link "2026" [ref=f5e30] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2026/
        - text: ","
        - link "2012" [ref=f5e31] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2012/
        - text: ","
        - link "2014" [ref=f5e32] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2014/
  - generic [ref=f5e33]:
    - heading "Financial Summary" [level=2] [ref=f5e34]
    - generic [ref=f5e35]:
      - term [ref=f5e36]: Total Receipts
      - definition [ref=f5e37]:
        - strong [ref=f5e38]: $0
      - term [ref=f5e39]: Total Disbursements
      - definition [ref=f5e40]: $0
  - generic [ref=f5e41]:
    - heading "Connected Organizations" [level=2] [ref=f5e42]
    - generic [ref=f5e43]:
      - term [ref=f5e44]: Connected Organization
      - definition [ref=f5e45]: 2018 SENATORS CLASSIC COMMITTEE
      - term [ref=f5e46]: Principal Candidate
      - definition [ref=f5e47]: S6WY00068
  - generic [ref=f5e48]:
    - heading "Candidates Supported" [level=2] [ref=f5e49]
    - paragraph [ref=f5e50]: "Candidates this committee officially supports:"
    - list [ref=f5e51]:
      - listitem [ref=f5e52]:
        - link "BARRASSO, JOHN A" [ref=f5e53] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/senate/wy/barrasso-john-a/
        - text: (2030)
      - listitem [ref=f5e54]:
        - link "BARRASSO, JOHN A" [ref=f5e55] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/senate/wy/barrasso-john-a/
        - text: (2024)
      - listitem [ref=f5e56]:
        - link "BARRASSO, JOHN A" [ref=f5e57] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/senate/wy/barrasso-john-a/
        - text: (2018)
      - listitem [ref=f5e58]:
        - link "BARRASSO, JOHN A" [ref=f5e59] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/senate/wy/barrasso-john-a/
        - text: (2012)
      - listitem [ref=f5e60]:
        - link "BARRASSO, JOHN A" [ref=f5e61] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/senate/wy/barrasso-john-a/
        - text: (2008)
    - paragraph [ref=f5e62]: Showing 5 of 5
  - generic [ref=f5e63]:
    - heading "Candidates Funded" [level=2] [ref=f5e64]
    - paragraph [ref=f5e65]: "Candidates receiving contributions from this committee:"
    - list [ref=f5e66]:
      - listitem [ref=f5e67]:
        - link "TRUMP, DONALD J. / MICHAEL R. PENCE" [ref=f5e68] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/president/trump-donald-j-michael-r-pence/
        - text: $4K (1 contributions)
      - listitem [ref=f5e69]:
        - link "HAGEMAN, HARRIET" [ref=f5e70] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/house/wy-00/hageman-harriet/
        - text: $1K (1 contributions)
    - paragraph [ref=f5e71]: Showing 2 of 2
  - generic [ref=f5e72]:
    - heading "Committees Funded" [level=2] [ref=f5e73]
    - paragraph [ref=f5e74]: "Committees receiving transfers from this committee:"
    - list [ref=f5e75]:
      - listitem [ref=f5e76]:
        - link "NATIONAL REPUBLICAN SENATORIAL COMMITTEE" [ref=f5e77] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/national-republican-senatorial-committee-c00027466/
        - text: $1.1M (10 transfers)
      - listitem [ref=f5e78]:
        - link "CORNYN VICTORY COMMITTEE" [ref=f5e79] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/cornyn-victory-committee-c00770180/
        - text: $670K (14 transfers)
      - listitem [ref=f5e80]:
        - link "BARRASSO VICTORY 2024" [ref=f5e81] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/barrasso-victory-2024-c00764373/
        - text: $326K (11 transfers)
      - listitem [ref=f5e82]:
        - link "FISCHER VICTORY FUND" [ref=f5e83] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/fischer-victory-fund-c00678367/
        - text: $250K (1 transfers)
      - listitem [ref=f5e84]:
        - link "2024 THUNE REPUBLICAN SENATE VICTORY" [ref=f5e85] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/2024-thune-republican-senate-victory-c00837435/
        - text: $192K (14 transfers)
      - listitem [ref=f5e86]:
        - link "WYOMING REPUBLICAN STATE COMMITTEE" [ref=f5e87] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/wyoming-republican-state-committee-c00005785/
        - text: $119K (19 transfers)
      - listitem [ref=f5e88]:
        - link "2011 SENATORS CLASSIC COMMITTEE" [ref=f5e89] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2011-senators-classic-committee-c00495390/
        - text: $112K (4 transfers)
      - listitem [ref=f5e90]:
        - link "2017 SENATORS CLASSIC COMMITTEE" [ref=f5e91] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2017-senators-classic-committee-c00637181/
        - text: $106K (2 transfers)
      - listitem [ref=f5e92]:
        - link "2018 SENATORS CLASSIC COMMITTEE" [ref=f5e93] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2018-senators-classic-committee-c00676676/
        - text: $104K (4 transfers)
      - listitem [ref=f5e94]:
        - link "REPUBLICAN PARTY OF TEXAS" [ref=f5e95] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/republican-party-of-texas-c00143743/
        - text: $100K (1 transfers)
      - listitem [ref=f5e96]:
        - link "2023 SENATORS CLASSIC COMMITTEE" [ref=f5e97] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2023-senators-classic-committee-c00837070/
        - text: $95K (4 transfers)
      - listitem [ref=f5e98]:
        - link "2024 SENATORS CLASSIC COMMITTEE" [ref=f5e99] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2024-senators-classic-committee-c00875542/
        - text: $81K (5 transfers)
      - listitem [ref=f5e100]:
        - link "2012 SENATORS CLASSIC COMMITTEE" [ref=f5e101] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2012-senators-classic-committee-c00518597/
        - text: $77K (3 transfers)
      - listitem [ref=f5e102]:
        - link "NEVADA VICTORY COMMITTEE" [ref=f5e103] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/nevada-victory-committee-c00890962/
        - text: $50K (1 transfers)
      - listitem [ref=f5e104]:
        - link "BARRASSO SHEEHY VICTORY COMMITTEE" [ref=f5e105] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/barrasso-sheehy-victory-committee-c00876375/
        - text: $43K (5 transfers)
      - listitem [ref=f5e106]:
        - link "ARIZONA PUBLIC SERVICE COMPANY POLITICAL ACTION COMMITTEE (APSPAC)" [ref=f5e107] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/arizona-public-service-company-political-action-committee-apspac-c00015933/
        - text: $42K (17 transfers)
      - listitem [ref=f5e108]:
        - link "NATIONAL ASSOCIATION OF CONVENIENCE STORES POLITICAL ACTION COMMITTEE" [ref=f5e109] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/national-association-of-convenience-stores-political-action-committee-c00126763/
        - text: $42K (15 transfers)
      - listitem [ref=f5e110]:
        - link "NATIONAL CABLE TELEVISION ASSOCIATION'S POLITICAL ACTION COMMITTEE (CABLE PAC)" [ref=f5e111] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/national-cable-television-associations-political-action-committee-cable-pac-c00010082/
        - text: $40K (13 transfers)
      - listitem [ref=f5e112]:
        - link "FREEDOM FUND" [ref=f5e113] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/freedom-fund-c00390674/
        - text: $40K (8 transfers)
      - listitem [ref=f5e114]:
        - link "NATIONAL BEER WHOLESALERS ASSOCIATION POLITICAL ACTION COMMITTEE" [ref=f5e115] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/national-beer-wholesalers-association-political-action-committee-c00144766/
        - text: $40K (12 transfers)
    - paragraph [ref=f5e116]: Showing 20 of 20
  - generic [ref=f5e117]:
    - heading "Funded By" [level=2] [ref=f5e118]
    - paragraph [ref=f5e119]: "Committees that have transferred funds to this committee:"
    - list [ref=f5e120]:
      - listitem [ref=f5e121]:
        - link "CORNYN VICTORY COMMITTEE" [ref=f5e122] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/cornyn-victory-committee-c00770180/
        - text: $670K (8 transfers)
      - listitem [ref=f5e123]:
        - link "NATIONAL REPUBLICAN SENATORIAL COMMITTEE - CONTRIBUTIONS *" [ref=f5e124] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/national-republican-senatorial-committee---contributions-c00091009/
        - text: $550K (2 transfers)
      - listitem [ref=f5e125]:
        - link "BARRASSO VICTORY 2024" [ref=f5e126] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/barrasso-victory-2024-c00764373/
        - text: $407K (10 transfers)
      - listitem [ref=f5e127]:
        - link "NATIONAL REPUBLICAN SENATORIAL COMMITTEE" [ref=f5e128] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/national-republican-senatorial-committee-c00027466/
        - text: $260K (3 transfers)
      - listitem [ref=f5e129]:
        - link "FISCHER VICTORY FUND" [ref=f5e130] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/fischer-victory-fund-c00678367/
        - text: $250K (1 transfers)
      - listitem [ref=f5e131]:
        - link "2024 THUNE REPUBLICAN SENATE VICTORY" [ref=f5e132] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/2024-thune-republican-senate-victory-c00837435/
        - text: $192K (7 transfers)
      - listitem [ref=f5e133]:
        - link "2012 SENATORS CLASSIC COMMITTEE" [ref=f5e134] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2012-senators-classic-committee-c00518597/
        - text: $151K (3 transfers)
      - listitem [ref=f5e135]:
        - link "2017 SENATORS CLASSIC COMMITTEE" [ref=f5e136] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2017-senators-classic-committee-c00637181/
        - text: $133K (2 transfers)
      - listitem [ref=f5e137]:
        - link "2011 SENATORS CLASSIC COMMITTEE" [ref=f5e138] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2011-senators-classic-committee-c00495390/
        - text: $112K (2 transfers)
      - listitem [ref=f5e139]:
        - link "2018 SENATORS CLASSIC COMMITTEE" [ref=f5e140] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2018-senators-classic-committee-c00676676/
        - text: $104K (3 transfers)
      - listitem [ref=f5e141]:
        - link "REPUBLICAN PARTY OF TEXAS" [ref=f5e142] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/republican-party-of-texas-c00143743/
        - text: $100K (1 transfers)
      - listitem [ref=f5e143]:
        - link "2023 SENATORS CLASSIC COMMITTEE" [ref=f5e144] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/2023-senators-classic-committee-c00837070/
        - text: $95K (2 transfers)
      - listitem [ref=f5e145]:
        - link "WYOMING REPUBLICAN STATE COMMITTEE" [ref=f5e146] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/wyoming-republican-state-committee-c00005785/
        - text: $77K (5 transfers)
      - listitem [ref=f5e147]:
        - link "BARRASSO-PRICE COMMITTEE" [ref=f5e148] [cursor=pointer]:
          - /url: https://us.elect.info/committees/house/barrasso-price-committee-c00512988/
        - text: $59K (2 transfers)
      - listitem [ref=f5e149]:
        - link "NEVADA VICTORY COMMITTEE" [ref=f5e150] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/nevada-victory-committee-c00890962/
        - text: $50K (1 transfers)
      - listitem [ref=f5e151]:
        - link "BARRASSO SHEEHY VICTORY COMMITTEE" [ref=f5e152] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/barrasso-sheehy-victory-committee-c00876375/
        - text: $41K (2 transfers)
      - listitem [ref=f5e153]:
        - link "BARRASSO-LUCAS COMMITTEE" [ref=f5e154] [cursor=pointer]:
          - /url: https://us.elect.info/committees/house/barrasso-lucas-committee-c00526392/
        - text: $41K (9 transfers)
      - listitem [ref=f5e155]:
        - link "TENNESSEE SENATE VICTORY FUND" [ref=f5e156] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/tennessee-senate-victory-fund-c00500850/
        - text: $36K (1 transfers)
      - listitem [ref=f5e157]:
        - link "BARRASSO CASSIDY VICTORY COMMITTEE" [ref=f5e158] [cursor=pointer]:
          - /url: https://us.elect.info/committees/senate/barrasso-cassidy-victory-committee-c00565556/
        - text: $30K (3 transfers)
      - listitem [ref=f5e159]:
        - link "BARRASSO YOUNG VICTORY FUND" [ref=f5e160] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/barrasso-young-victory-fund-c00781773/
        - text: $28K (3 transfers)
    - paragraph [ref=f5e161]: Showing 20 of 20
  - contentinfo [ref=f5e162]:
    - paragraph [ref=f5e163]:
      - link "elect.info" [ref=f5e164] [cursor=pointer]:
        - /url: https://us.elect.info/
      - text: "| Data from"
      - link "Federal Election Commission" [ref=f5e165] [cursor=pointer]:
        - /url: https://www.fec.gov/
      - text: "| Generated 2026-01-16"
```

# Test source

```ts
  145 | 
  146 |   if (isSitemapIndex(xml)) {
  147 |     // This is a sitemap index - sample child sitemaps and recurse
  148 |     console.log(`${indent}Detected sitemap index, sampling ${CHILD_SITEMAP_SAMPLE_SIZE} child sitemaps`);
  149 | 
  150 |     const childSitemaps = getRandomItems(urls, CHILD_SITEMAP_SAMPLE_SIZE, sitemapPath);
  151 |     for (const childUrl of childSitemaps) {
  152 |       const childPath = toRelativePath(childUrl);
  153 |       console.log(`${indent}Processing child sitemap: ${childPath}`);
  154 | 
  155 |       const childResult = await testSitemapUrls(page, baseUrl, childPath, depth + 1);
  156 |       result.tested += childResult.tested;
  157 |       result.errors.push(...childResult.errors);
  158 |     }
  159 |   } else {
  160 |     // This is a regular sitemap with page URLs - sample and test
  161 |     const sampleUrls = getRandomItems(urls, SAMPLE_SIZE, sitemapPath);
  162 | 
  163 |     for (const url of sampleUrls) {
  164 |       const path = toRelativePath(url);
  165 | 
  166 |       // Check if this URL is itself a sitemap (nested sitemap within urlset)
  167 |       if (isSitemapUrl(url)) {
  168 |         console.log(`${indent}Found nested sitemap URL: ${path}`);
  169 |         const nestedResult = await testSitemapUrls(page, baseUrl, path, depth + 1);
  170 |         result.tested += nestedResult.tested;
  171 |         result.errors.push(...nestedResult.errors);
  172 |       } else {
  173 |         // Regular page URL - verify it loads
  174 |         console.log(`${indent}Testing page: ${path}`);
  175 |         const pageResponse = await page.goto(path, { timeout: PAGE_TIMEOUT });
  176 |         result.tested++;
  177 | 
  178 |         if (pageResponse?.status() !== 200) {
  179 |           const error = `Expected 200 for ${path}, got ${pageResponse?.status()}`;
  180 |           console.log(`${indent}  ERROR: ${error}`);
  181 |           result.errors.push(error);
  182 |         } else {
  183 |           // Verify page has content
  184 |           const h1Visible = await page.locator('h1').isVisible().catch(() => false);
  185 |           if (!h1Visible) {
  186 |             const error = `Page ${path} loaded but has no visible h1`;
  187 |             console.log(`${indent}  WARNING: ${error}`);
  188 |             // Don't treat missing h1 as hard failure, just log it
  189 |           }
  190 |         }
  191 |       }
  192 |     }
  193 |   }
  194 | 
  195 |   console.log(`${indent}Tested ${result.tested} URLs from ${sitemapPath}`);
  196 |   return result;
  197 | }
  198 | 
  199 | test.describe('sitemap URL validation', () => {
  200 | 
  201 |   test('sitemap index loads and contains child sitemaps', async ({ page }) => {
  202 |     const response = await page.goto('/sitemap.xml');
  203 |     expect(response?.status()).toBe(200);
  204 | 
  205 |     const content = await page.content();
  206 |     expect(content).toContain('sitemapindex');
  207 |     expect(content).toContain('sitemap-candidates.xml');
  208 |   });
  209 | 
  210 |   test('candidates sitemap - sample URLs resolve', async ({ page }) => {
  211 |     test.setTimeout(120000);
  212 | 
  213 |     // Navigate to a simple page first so we have a page context for fetch
  214 |     await page.goto('/');
  215 |     const baseUrl = new URL(page.url()).origin;
  216 | 
  217 |     const result = await testSitemapUrls(page, baseUrl, '/candidates/sitemap-candidates.xml');
  218 | 
  219 |     if (result.tested === 0 && !STRICT) {
  220 |       test.skip();
  221 |       return;
  222 |     }
  223 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  224 | 
  225 |     console.log(`Tested ${result.tested} URLs from candidates sitemap`);
  226 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  227 |   });
  228 | 
  229 |   test('committees sitemap - sample URLs resolve', async ({ page }) => {
  230 |     test.setTimeout(120000);
  231 | 
  232 |     // Navigate to a simple page first so we have a page context for fetch
  233 |     await page.goto('/');
  234 |     const baseUrl = new URL(page.url()).origin;
  235 | 
  236 |     const result = await testSitemapUrls(page, baseUrl, '/committees/sitemap-committees.xml');
  237 | 
  238 |     if (result.tested === 0 && !STRICT) {
  239 |       test.skip();
  240 |       return;
  241 |     }
  242 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  243 | 
  244 |     console.log(`Tested ${result.tested} URLs from committees sitemap`);
> 245 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
      |                                                                  ^ Error: Errors: /committees/sitemap-committees.xml lists 83545 URLs (limit 50000)
  246 |   });
  247 | 
  248 |   test('parties sitemap - sample URLs resolve', async ({ page }) => {
  249 |     await page.goto('/');
  250 |     const baseUrl = new URL(page.url()).origin;
  251 | 
  252 |     const result = await testSitemapUrls(page, baseUrl, '/parties/sitemap-parties.xml');
  253 | 
  254 |     if (result.tested === 0 && !STRICT) {
  255 |       test.skip();
  256 |       return;
  257 |     }
  258 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  259 | 
  260 |     console.log(`Tested ${result.tested} URLs from parties sitemap`);
  261 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  262 |   });
  263 | 
  264 |   test('offices sitemap - sample URLs resolve', async ({ page }) => {
  265 |     await page.goto('/');
  266 |     const baseUrl = new URL(page.url()).origin;
  267 | 
  268 |     const result = await testSitemapUrls(page, baseUrl, '/offices/sitemap-offices.xml');
  269 | 
  270 |     if (result.tested === 0 && !STRICT) {
  271 |       test.skip();
  272 |       return;
  273 |     }
  274 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  275 | 
  276 |     console.log(`Tested ${result.tested} URLs from offices sitemap`);
  277 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  278 |   });
  279 | 
  280 |   test('districts sitemap - sample URLs resolve', async ({ page }) => {
  281 |     await page.goto('/');
  282 |     const baseUrl = new URL(page.url()).origin;
  283 | 
  284 |     const result = await testSitemapUrls(page, baseUrl, '/districts/sitemap-districts.xml');
  285 | 
  286 |     if (result.tested === 0 && !STRICT) {
  287 |       test.skip();
  288 |       return;
  289 |     }
  290 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  291 | 
  292 |     console.log(`Tested ${result.tested} URLs from districts sitemap`);
  293 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  294 |   });
  295 | 
  296 |   test('states sitemap - sample URLs resolve', async ({ page }) => {
  297 |     await page.goto('/');
  298 |     const baseUrl = new URL(page.url()).origin;
  299 | 
  300 |     const result = await testSitemapUrls(page, baseUrl, '/states/sitemap-states.xml');
  301 | 
  302 |     if (result.tested === 0 && !STRICT) {
  303 |       test.skip();
  304 |       return;
  305 |     }
  306 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  307 | 
  308 |     console.log(`Tested ${result.tested} URLs from states sitemap`);
  309 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  310 |   });
  311 | 
  312 |   test('elections sitemap - sample URLs resolve', async ({ page }) => {
  313 |     await page.goto('/');
  314 |     const baseUrl = new URL(page.url()).origin;
  315 | 
  316 |     const result = await testSitemapUrls(page, baseUrl, '/elections/sitemap-elections.xml');
  317 | 
  318 |     if (result.tested === 0 && !STRICT) {
  319 |       test.skip();
  320 |       return;
  321 |     }
  322 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  323 | 
  324 |     console.log(`Tested ${result.tested} URLs from elections sitemap`);
  325 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  326 |   });
  327 | 
  328 | });
  329 | 
```