# 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/entities.spec.ts >> entity browse sort order - quantitative fields >> individuals sorted by total contributions descending
- Location: tests/ui/entities.spec.ts:405:7

# Error details

```
Error: top individual donor should have contributions

expect(received).toBeGreaterThan(expected)

Expected: > 0
Received:   0
```

# Page snapshot

```yaml
- generic [active] [ref=e1]:
  - link "← Back to Home" [ref=e2] [cursor=pointer]:
    - /url: /
  - banner [ref=e3]:
    - heading "Individual Donors" [level=1] [ref=e4]
    - paragraph [ref=e5]: Contributors to federal campaigns
  - generic [ref=e6]:
    - generic [ref=e7]:
      - textbox "Search individual donors by name, city, employer..." [ref=e8]
      - button "Search" [ref=e9] [cursor=pointer]
    - generic [ref=e10]:
      - heading "All Individual Donors" [level=3] [ref=e12]
      - generic [ref=e13]:
        - 'link "BOWDEN, R STEVE GREENSBORO, NC | ATTORNEY at SELF-EMPLOYED Party Affinity – DEM: 58% REP: 42%" [ref=e14] [cursor=pointer]':
          - /url: /individuals/i-89cd989dfb0e8ca29c5d9e365a5d0039/
          - generic [ref=e15]: BOWDEN, R STEVE
          - generic [ref=e16]: GREENSBORO, NC | ATTORNEY at SELF-EMPLOYED
          - generic [ref=e17]: "Party Affinity – DEM: 58% REP: 42%"
        - 'link "Sanfelippo, MaryL. Dr. Escondido, CA | Self-Employed/Physician Party Affinity – DEM: 32% REP: 68%" [ref=e18] [cursor=pointer]':
          - /url: /individuals/i-89ce18f3098de3ce712295e0c924541d/
          - generic [ref=e19]: Sanfelippo, MaryL. Dr.
          - generic [ref=e20]: Escondido, CA | Self-Employed/Physician
          - generic [ref=e21]: "Party Affinity – DEM: 32% REP: 68%"
        - 'link "MARCELL, WANDA M THE WOODLANDS, TX | SR COMMERCIAL MKTG ADVISOR at ANADARKO PETROLEUM CORPORATION Party Affinity – DEM: 46% REP: 54%" [ref=e22] [cursor=pointer]':
          - /url: /individuals/i-89ce6b61a36261be5286cc1f631f6416/
          - generic [ref=e23]: MARCELL, WANDA M
          - generic [ref=e24]: THE WOODLANDS, TX | SR COMMERCIAL MKTG ADVISOR at ANADARKO PETROLEUM CORPORATION
          - generic [ref=e25]: "Party Affinity – DEM: 46% REP: 54%"
        - 'link "HARRIS, MARK SAN FRANCISCO, CA | CLIENT PLATFORM ENGINEER at ID RATHER NOT SAY Party Affinity – DEM: 73% REP: 27%" [ref=e26] [cursor=pointer]':
          - /url: /individuals/i-89ce9e668c11eacd43488863f30c963c/
          - generic [ref=e27]: HARRIS, MARK
          - generic [ref=e28]: SAN FRANCISCO, CA | CLIENT PLATFORM ENGINEER at ID RATHER NOT SAY
          - generic [ref=e29]: "Party Affinity – DEM: 73% REP: 27%"
        - link "HESSELGESSER, JOE L. CENTRAL CITY, NE" [ref=e30] [cursor=pointer]:
          - /url: /individuals/i-89cfa07977df7565d0f9b1f059e6bca1/
          - generic [ref=e31]: HESSELGESSER, JOE L.
          - generic [ref=e32]: CENTRAL CITY, NE
        - 'link "MACDONALD, DIANE BRIGHTON, MA | NOT EMPLOYED at NOT EMPLOYED Party Affinity – DEM: 73% REP: 27%" [ref=e33] [cursor=pointer]':
          - /url: /individuals/i-89cfd1a6ee548d5ecdb723e699220e9d/
          - generic [ref=e34]: MACDONALD, DIANE
          - generic [ref=e35]: BRIGHTON, MA | NOT EMPLOYED at NOT EMPLOYED
          - generic [ref=e36]: "Party Affinity – DEM: 73% REP: 27%"
        - 'link "FLORES, CARISSA BAKERSFIELD, CA | ASST STORE MANAGER at HOME DEPOT U.S.A., INC. Party Affinity – DEM: 47% REP: 53%" [ref=e37] [cursor=pointer]':
          - /url: /individuals/i-89d12ee91b2e7d03b5f14b4ce90c5567/
          - generic [ref=e38]: FLORES, CARISSA
          - generic [ref=e39]: BAKERSFIELD, CA | ASST STORE MANAGER at HOME DEPOT U.S.A., INC.
          - generic [ref=e40]: "Party Affinity – DEM: 47% REP: 53%"
        - link "DUCHETEAU, TOM CROMWELL, IN | PRESIDENT at LAKETRONICS INC" [ref=e41] [cursor=pointer]:
          - /url: /individuals/i-89d2119dd8aa890662f75037680e3e6d/
          - generic [ref=e42]: DUCHETEAU, TOM
          - generic [ref=e43]: CROMWELL, IN | PRESIDENT at LAKETRONICS INC
        - 'link "STANTON, SUSAN GAINESVILLE, FL | CFO at EPISCOPAL DIOCESE OF LOS ANGELES Party Affinity – DEM: 66% REP: 34%" [ref=e44] [cursor=pointer]':
          - /url: /individuals/i-89d2367b6d76d6ce476b90210ed30495/
          - generic [ref=e45]: STANTON, SUSAN
          - generic [ref=e46]: GAINESVILLE, FL | CFO at EPISCOPAL DIOCESE OF LOS ANGELES
          - generic [ref=e47]: "Party Affinity – DEM: 66% REP: 34%"
        - 'link "MCCARTNEY, DONALD PALMETTO BAY, FL Party Affinity – DEM: 10% REP: 90%" [ref=e48] [cursor=pointer]':
          - /url: /individuals/i-89d265467c5dc8805a4eba52ad79a9e9/
          - generic [ref=e49]: MCCARTNEY, DONALD
          - generic [ref=e50]: PALMETTO BAY, FL
          - generic [ref=e51]: "Party Affinity – DEM: 10% REP: 90%"
        - 'link "NORTON, REGINA TUCSON, AZ | NOT EMPLOYED at NONE Party Affinity – DEM: 61% REP: 39%" [ref=e52] [cursor=pointer]':
          - /url: /individuals/i-89d2ebb77d0a5ef4216eb9bb85ba0c06/
          - generic [ref=e53]: NORTON, REGINA
          - generic [ref=e54]: TUCSON, AZ | NOT EMPLOYED at NONE
          - generic [ref=e55]: "Party Affinity – DEM: 61% REP: 39%"
        - 'link "CALLEY, JOHN LOS ANGELES, CA | INDEPENDENT PRODUCER at INFORMATION REQUESTED Party Affinity – DEM: 68% REP: 32%" [ref=e56] [cursor=pointer]':
          - /url: /individuals/i-89d2f02e89c8694e02b140bbcbb7a814/
          - generic [ref=e57]: CALLEY, JOHN
          - generic [ref=e58]: LOS ANGELES, CA | INDEPENDENT PRODUCER at INFORMATION REQUESTED
          - generic [ref=e59]: "Party Affinity – DEM: 68% REP: 32%"
        - 'link "DAUGHERTY, WILLIAM MONTECITO, CA | RETIRED at SELF Party Affinity – DEM: 33% REP: 67%" [ref=e60] [cursor=pointer]':
          - /url: /individuals/i-89d375df4e0dabb220d95ed26c955f07/
          - generic [ref=e61]: DAUGHERTY, WILLIAM
          - generic [ref=e62]: MONTECITO, CA | RETIRED at SELF
          - generic [ref=e63]: "Party Affinity – DEM: 33% REP: 67%"
        - 'link "BOLL, DANIEL LEBANON, PA Party Affinity – DEM: 10% REP: 90%" [ref=e64] [cursor=pointer]':
          - /url: /individuals/i-89d40a15c84c4b316fa8786358d71e64/
          - generic [ref=e65]: BOLL, DANIEL
          - generic [ref=e66]: LEBANON, PA
          - generic [ref=e67]: "Party Affinity – DEM: 10% REP: 90%"
        - 'link "ALFINO, FRANK TEMPLETON, CA Party Affinity – DEM: 74% REP: 26%" [ref=e68] [cursor=pointer]':
          - /url: /individuals/i-89d4b764defb678367d75a129236344f/
          - generic [ref=e69]: ALFINO, FRANK
          - generic [ref=e70]: TEMPLETON, CA
          - generic [ref=e71]: "Party Affinity – DEM: 74% REP: 26%"
        - link "MURPHY, ROBERT CARY, NC | EXECUTIVE at STUDENT CONSERVATION ASSOCIATION" [ref=e72] [cursor=pointer]:
          - /url: /individuals/i-89d4d2e37b421b496ab985a9c9294024/
          - generic [ref=e73]: MURPHY, ROBERT
          - generic [ref=e74]: CARY, NC | EXECUTIVE at STUDENT CONSERVATION ASSOCIATION
        - 'link "KRUSE, PATRICIA ENGLEWOOD, OH | NOT EMPLOYED at NOT EMPLOYED Party Affinity – DEM: 73% REP: 27%" [ref=e75] [cursor=pointer]':
          - /url: /individuals/i-89d56fbc6b0edcaedfd1cd1002bba651/
          - generic [ref=e76]: KRUSE, PATRICIA
          - generic [ref=e77]: ENGLEWOOD, OH | NOT EMPLOYED at NOT EMPLOYED
          - generic [ref=e78]: "Party Affinity – DEM: 73% REP: 27%"
        - 'link "JOST, ETHAN WASHINGTON, DC | CONSULTANT at IBM Party Affinity – DEM: 73% REP: 27%" [ref=e79] [cursor=pointer]':
          - /url: /individuals/i-89d5b1cd96313233dbc12cc2c76ef6bc/
          - generic [ref=e80]: JOST, ETHAN
          - generic [ref=e81]: WASHINGTON, DC | CONSULTANT at IBM
          - generic [ref=e82]: "Party Affinity – DEM: 73% REP: 27%"
        - 'link "PHILLIPS, GREGORY CARROLLTON, TX | INVESTOR at BROADHAVEN Party Affinity – DEM: 69% REP: 31%" [ref=e83] [cursor=pointer]':
          - /url: /individuals/i-89d66cba35a19327f34d33668d69e775/
          - generic [ref=e84]: PHILLIPS, GREGORY
          - generic [ref=e85]: CARROLLTON, TX | INVESTOR at BROADHAVEN
          - generic [ref=e86]: "Party Affinity – DEM: 69% REP: 31%"
        - 'link "MOSS, STEVEN FAYETTEVILLE, AR | SCIENTIST at THE AEROSPACE CORP Party Affinity – DEM: 65% REP: 35%" [ref=e87] [cursor=pointer]':
          - /url: /individuals/i-89d6c1257155eace012f97171d8d6b12/
          - generic [ref=e88]: MOSS, STEVEN
          - generic [ref=e89]: FAYETTEVILLE, AR | SCIENTIST at THE AEROSPACE CORP
          - generic [ref=e90]: "Party Affinity – DEM: 65% REP: 35%"
        - link "BRADFORD, PAUL BEDFORD, MA | ENGINEER at IMPRIVATA" [ref=e91] [cursor=pointer]:
          - /url: /individuals/i-89d70862c9324b555ce4cc88d3ba25a2/
          - generic [ref=e92]: BRADFORD, PAUL
          - generic [ref=e93]: BEDFORD, MA | ENGINEER at IMPRIVATA
        - 'link "MCGLOHORN, GREG IRMO, SC | MANAGER at SCANA Party Affinity – DEM: 43% REP: 57%" [ref=e94] [cursor=pointer]':
          - /url: /individuals/i-89d8a23efc63c75929c48d258522dbee/
          - generic [ref=e95]: MCGLOHORN, GREG
          - generic [ref=e96]: IRMO, SC | MANAGER at SCANA
          - generic [ref=e97]: "Party Affinity – DEM: 43% REP: 57%"
        - 'link "PETERSON, PATRICIA SAINT PAUL, MN | CONSULTANT at SELF Party Affinity – DEM: 66% REP: 34%" [ref=e98] [cursor=pointer]':
          - /url: /individuals/i-89d8ab5e150eaa2b85c129e847b3a546/
          - generic [ref=e99]: PETERSON, PATRICIA
          - generic [ref=e100]: SAINT PAUL, MN | CONSULTANT at SELF
          - generic [ref=e101]: "Party Affinity – DEM: 66% REP: 34%"
        - 'link "MARIO, GREG MR MIAMI BEACH, FL | WORKER at SELF EMPLOYED Party Affinity – DEM: 38% REP: 62%" [ref=e102] [cursor=pointer]':
          - /url: /individuals/i-89d8eccb37ea5075854969ff353f15c7/
          - generic [ref=e103]: MARIO, GREG MR
          - generic [ref=e104]: MIAMI BEACH, FL | WORKER at SELF EMPLOYED
          - generic [ref=e105]: "Party Affinity – DEM: 38% REP: 62%"
        - 'link "WELCH, JACK MARLIN, TX | LAWYER at SELF Party Affinity – DEM: 56% REP: 44%" [ref=e106] [cursor=pointer]':
          - /url: /individuals/i-89d9316102e42a5c039f2a16b098c573/
          - generic [ref=e107]: WELCH, JACK
          - generic [ref=e108]: MARLIN, TX | LAWYER at SELF
          - generic [ref=e109]: "Party Affinity – DEM: 56% REP: 44%"
        - 'link "SAFARKHANI, ALI BOSTON, MA | NOT EMPLOYED at NOT EMPLOYED Party Affinity – DEM: 84% REP: 16%" [ref=e110] [cursor=pointer]':
          - /url: /individuals/i-89d9bb3f2dfd3c7f1d857699d0c68677/
          - generic [ref=e111]: SAFARKHANI, ALI
          - generic [ref=e112]: BOSTON, MA | NOT EMPLOYED at NOT EMPLOYED
          - generic [ref=e113]: "Party Affinity – DEM: 84% REP: 16%"
        - 'link "JOHNSON, GRANT D SAN FRANCISCO, CA | BENEDAT CAPITAL Party Affinity – DEM: 45% REP: 55%" [ref=e114] [cursor=pointer]':
          - /url: /individuals/i-89d9d75930f7b1801ff7cb629fa1fe5e/
          - generic [ref=e115]: JOHNSON, GRANT D
          - generic [ref=e116]: SAN FRANCISCO, CA | BENEDAT CAPITAL
          - generic [ref=e117]: "Party Affinity – DEM: 45% REP: 55%"
        - 'link "FOISY, WILLIAM RED LODGE, MT | NOT EMPLOYED at NOT EMPLOYED Party Affinity – DEM: 58% REP: 42%" [ref=e118] [cursor=pointer]':
          - /url: /individuals/i-89d9eb778decc6d568187ea9919e0de5/
          - generic [ref=e119]: FOISY, WILLIAM
          - generic [ref=e120]: RED LODGE, MT | NOT EMPLOYED at NOT EMPLOYED
          - generic [ref=e121]: "Party Affinity – DEM: 58% REP: 42%"
        - 'link "SUAZO, EDWARD F LOS ANGELES, CA | STUDENT Party Affinity – DEM: 84% REP: 16%" [ref=e122] [cursor=pointer]':
          - /url: /individuals/i-89d9ef29ff0165e349c9ff93f41e681e/
          - generic [ref=e123]: SUAZO, EDWARD F
          - generic [ref=e124]: LOS ANGELES, CA | STUDENT
          - generic [ref=e125]: "Party Affinity – DEM: 84% REP: 16%"
        - 'link "ABBASS, BRITTANY MS. WINDERMERE, FL | PRODUCTION EXECUTIVE at FREEMAN ANGEL FILMS Party Affinity – DEM: 43% REP: 57%" [ref=e126] [cursor=pointer]':
          - /url: /individuals/i-89dab655c3ffd0216d362e0ec440854e/
          - generic [ref=e127]: ABBASS, BRITTANY MS.
          - generic [ref=e128]: WINDERMERE, FL | PRODUCTION EXECUTIVE at FREEMAN ANGEL FILMS
          - generic [ref=e129]: "Party Affinity – DEM: 43% REP: 57%"
        - 'link "BOHR, PETER H. MR. JR. SAN ANSELMO, CA | RETIRED at RETIRED Party Affinity – DEM: 32% REP: 68%" [ref=e130] [cursor=pointer]':
          - /url: /individuals/i-89db46672b3f73608cd5b43df7e8a464/
          - generic [ref=e131]: BOHR, PETER H. MR. JR.
          - generic [ref=e132]: SAN ANSELMO, CA | RETIRED at RETIRED
          - generic [ref=e133]: "Party Affinity – DEM: 32% REP: 68%"
        - 'link "NYE, BILL SEATTLE, WA | WRITER at NYE LABS LLC Party Affinity – DEM: 57% REP: 43%" [ref=e134] [cursor=pointer]':
          - /url: /individuals/i-89dbd1628f2549249086f177929fe293/
          - generic [ref=e135]: NYE, BILL
          - generic [ref=e136]: SEATTLE, WA | WRITER at NYE LABS LLC
          - generic [ref=e137]: "Party Affinity – DEM: 57% REP: 43%"
        - 'link "DEWITT, GLENN E SUGARLAND, TX | ENG CONSULTANT FACILITIES SR at OCCIDENTAL OIL & GAS CORP. Party Affinity – DEM: 47% REP: 53%" [ref=e138] [cursor=pointer]':
          - /url: /individuals/i-89dc130e3bebc31b5ef8282d078762cd/
          - generic [ref=e139]: DEWITT, GLENN E
          - generic [ref=e140]: SUGARLAND, TX | ENG CONSULTANT FACILITIES SR at OCCIDENTAL OIL & GAS CORP.
          - generic [ref=e141]: "Party Affinity – DEM: 47% REP: 53%"
        - 'link "HORNBUCKLE, STEPHEN BELLEVUE, WA | ATTORNEY at SELF EMPLOYED Party Affinity – DEM: 81% REP: 19%" [ref=e142] [cursor=pointer]':
          - /url: /individuals/i-89dc455ba9c075c8d1fe7f1f2225d2cc/
          - generic [ref=e143]: HORNBUCKLE, STEPHEN
          - generic [ref=e144]: BELLEVUE, WA | ATTORNEY at SELF EMPLOYED
          - generic [ref=e145]: "Party Affinity – DEM: 81% REP: 19%"
        - 'link "JONSSON, ELIZABETH WESTPORT, MA | RETIRED at RETIRED Party Affinity – DEM: 32% REP: 68%" [ref=e146] [cursor=pointer]':
          - /url: /individuals/i-89dc916969634332788b1b426f00322b/
          - generic [ref=e147]: JONSSON, ELIZABETH
          - generic [ref=e148]: WESTPORT, MA | RETIRED at RETIRED
          - generic [ref=e149]: "Party Affinity – DEM: 32% REP: 68%"
        - 'link "MELCER, JEFFREY NEW YORK, NY | ATTORNEY at LAW OFFICES OF JEFFREY B MELCER, PLLC Party Affinity – DEM: 74% REP: 26%" [ref=e150] [cursor=pointer]':
          - /url: /individuals/i-89dcd35ac3f018c3aae90ebd5783e748/
          - generic [ref=e151]: MELCER, JEFFREY
          - generic [ref=e152]: NEW YORK, NY | ATTORNEY at LAW OFFICES OF JEFFREY B MELCER, PLLC
          - generic [ref=e153]: "Party Affinity – DEM: 74% REP: 26%"
        - 'link "MAO, VEASNA LOS ANGELES, CA | DISABLED VETERAN at N/A Party Affinity – DEM: 61% REP: 39%" [ref=e154] [cursor=pointer]':
          - /url: /individuals/i-89dce2d097bcf1be8f0f7539aaea90bb/
          - generic [ref=e155]: MAO, VEASNA
          - generic [ref=e156]: LOS ANGELES, CA | DISABLED VETERAN at N/A
          - generic [ref=e157]: "Party Affinity – DEM: 61% REP: 39%"
        - 'link "Harle, Nicki Mrs. Baird, TX | Tx Midwest Community Network/Execut Party Affinity – DEM: 29% REP: 71%" [ref=e158] [cursor=pointer]':
          - /url: /individuals/i-89ddb62dc097c777781280a3689ab52f/
          - generic [ref=e159]: Harle, Nicki Mrs.
          - generic [ref=e160]: Baird, TX | Tx Midwest Community Network/Execut
          - generic [ref=e161]: "Party Affinity – DEM: 29% REP: 71%"
        - link "SKINNER, JEFF WILLIAMSBURG, VA | ENTREPRENEUR at ENTREPRENEUR" [ref=e162] [cursor=pointer]:
          - /url: /individuals/i-89ddcc42e4a51fc57b7f6ede0f315668/
          - generic [ref=e163]: SKINNER, JEFF
          - generic [ref=e164]: WILLIAMSBURG, VA | ENTREPRENEUR at ENTREPRENEUR
        - 'link "CHERRY, KATHLEEN L. MS. TRAVERSE CITY, MI | RETIRED at RETIRED Party Affinity – DEM: 32% REP: 68%" [ref=e165] [cursor=pointer]':
          - /url: /individuals/i-89de162f9777d7952ba97828a189ff89/
          - generic [ref=e166]: CHERRY, KATHLEEN L. MS.
          - generic [ref=e167]: TRAVERSE CITY, MI | RETIRED at RETIRED
          - generic [ref=e168]: "Party Affinity – DEM: 32% REP: 68%"
        - 'link "DYKES, DONALD L LAUREL, DE | BANK OFFICER at BANK OF DELMARVA Party Affinity – DEM: 0% REP: 100%" [ref=e169] [cursor=pointer]':
          - /url: /individuals/i-89de4e4494e4adfd396deab7ad74da3e/
          - generic [ref=e170]: DYKES, DONALD L
          - generic [ref=e171]: LAUREL, DE | BANK OFFICER at BANK OF DELMARVA
          - generic [ref=e172]: "Party Affinity – DEM: 0% REP: 100%"
        - 'link "DIAMOND, LEE FALLS CHURCH, VA | ACTIVIST at SELF Party Affinity – DEM: 66% REP: 34%" [ref=e173] [cursor=pointer]':
          - /url: /individuals/i-89de8e4daef212dcf0022b3ae6417935/
          - generic [ref=e174]: DIAMOND, LEE
          - generic [ref=e175]: FALLS CHURCH, VA | ACTIVIST at SELF
          - generic [ref=e176]: "Party Affinity – DEM: 66% REP: 34%"
        - 'link "BELL, SUZANNE HAVELOCK, NC | OFFICE MANAGER at SUGEBE CORP Party Affinity – DEM: 23% REP: 77%" [ref=e177] [cursor=pointer]':
          - /url: /individuals/i-89dec19d4513fbafd753b7b521289a67/
          - generic [ref=e178]: BELL, SUZANNE
          - generic [ref=e179]: HAVELOCK, NC | OFFICE MANAGER at SUGEBE CORP
          - generic [ref=e180]: "Party Affinity – DEM: 23% REP: 77%"
        - 'link "BARLOW, JUSTIN DRAPER, UT | PLUMBER at JS MECHANICAL Party Affinity – DEM: 27% REP: 73%" [ref=e181] [cursor=pointer]':
          - /url: /individuals/i-89e046ebfbefa58130593460da020f0d/
          - generic [ref=e182]: BARLOW, JUSTIN
          - generic [ref=e183]: DRAPER, UT | PLUMBER at JS MECHANICAL
          - generic [ref=e184]: "Party Affinity – DEM: 27% REP: 73%"
        - 'link "DUBE, LINDA FITCHBURG, MA | NOT EMPLOYED at NOT EMPLOYED Party Affinity – DEM: 57% REP: 43%" [ref=e185] [cursor=pointer]':
          - /url: /individuals/i-89e199437c5d8c98b186d2ab59f764a4/
          - generic [ref=e186]: DUBE, LINDA
          - generic [ref=e187]: FITCHBURG, MA | NOT EMPLOYED at NOT EMPLOYED
          - generic [ref=e188]: "Party Affinity – DEM: 57% REP: 43%"
        - 'link "MOORE, BRYAN LEXINGTON, KY | PROJECT MANAGER at CODELL CONSTRUCTION Party Affinity – DEM: 46% REP: 54%" [ref=e189] [cursor=pointer]':
          - /url: /individuals/i-89e1a06999e37011bc0ddaebac45aa97/
          - generic [ref=e190]: MOORE, BRYAN
          - generic [ref=e191]: LEXINGTON, KY | PROJECT MANAGER at CODELL CONSTRUCTION
          - generic [ref=e192]: "Party Affinity – DEM: 46% REP: 54%"
        - 'link "ROBERTS, NANETTE INDIANAPOLIS, IN | RN at NA Party Affinity – DEM: 73% REP: 27%" [ref=e193] [cursor=pointer]':
          - /url: /individuals/i-89e20589bb2ab8e0c88cec9a384b431f/
          - generic [ref=e194]: ROBERTS, NANETTE
          - generic [ref=e195]: INDIANAPOLIS, IN | RN at NA
          - generic [ref=e196]: "Party Affinity – DEM: 73% REP: 27%"
        - 'link "KELSO, EDWARD MALVERN, PA | HEAD OF DISTRIBUTION AMERICAS at AZPLP Party Affinity – DEM: 49% REP: 51%" [ref=e197] [cursor=pointer]':
          - /url: /individuals/i-89e300915b972bcf3ccc862ea6ead21c/
          - generic [ref=e198]: KELSO, EDWARD
          - generic [ref=e199]: MALVERN, PA | HEAD OF DISTRIBUTION AMERICAS at AZPLP
          - generic [ref=e200]: "Party Affinity – DEM: 49% REP: 51%"
        - 'link "KOSHIYAMA, LEAH PORTLAND, OR | PRINCIPAL PRODUCT DIRECTOR at NIKE Party Affinity – DEM: 70% REP: 30%" [ref=e201] [cursor=pointer]':
          - /url: /individuals/i-89e31643a3709f4cc69ac6445ad16895/
          - generic [ref=e202]: KOSHIYAMA, LEAH
          - generic [ref=e203]: PORTLAND, OR | PRINCIPAL PRODUCT DIRECTOR at NIKE
          - generic [ref=e204]: "Party Affinity – DEM: 70% REP: 30%"
        - 'link "CHILDS, BEN CHICAGO, IL | DIGITAL MARKETING at APOLLO ARTISTRY Party Affinity – DEM: 73% REP: 27%" [ref=e205] [cursor=pointer]':
          - /url: /individuals/i-89e36cc7f29da458c2f0375341cfadc7/
          - generic [ref=e206]: CHILDS, BEN
          - generic [ref=e207]: CHICAGO, IL | DIGITAL MARKETING at APOLLO ARTISTRY
          - generic [ref=e208]: "Party Affinity – DEM: 73% REP: 27%"
      - generic [ref=e209]:
        - generic [ref=e210]: Showing 1-50
        - generic [ref=e211]:
          - button "First" [disabled] [ref=e212]
          - button "Prev" [disabled] [ref=e213]
          - button "1" [ref=e214] [cursor=pointer]
          - button "Next" [ref=e215] [cursor=pointer]
  - main [ref=e216]
```

# Test source

```ts
  309 | });
  310 | 
  311 | test.describe('district profile - dynamic candidates', () => {
  312 |   const DISTRICT_PATH = '/districts/tx-10/';
  313 | 
  314 |   test('district profile loads candidates filtered to district', async ({ page }) => {
  315 |     const responsePromise = page.waitForResponse(resp => {
  316 |       if (!resp.url().includes('/api/graphql')) return false;
  317 |       if (resp.request().method() !== 'POST') return false;
  318 |       const body = resp.request().postData() || '';
  319 |       return body.includes('browseEntities');
  320 |     }, { timeout: DATA_LOAD_TIMEOUT });
  321 | 
  322 |     await page.goto(DISTRICT_PATH);
  323 |     const response = await responsePromise;
  324 | 
  325 |     const requestBody = JSON.parse(response.request().postData() || '{}');
  326 |     const filter = requestBody.variables?.filter || '';
  327 |     expect(filter).toContain('office:H');
  328 |     expect(filter).toContain('office_state:TX');
  329 |     expect(filter).toContain('office_district:10');
  330 | 
  331 |     const json = await response.json();
  332 |     const results = json.data?.browseEntities?.results || [];
  333 |     expect(results.length).toBeGreaterThan(0);
  334 |   });
  335 | 
  336 |   test('district profile candidates sorted by total contributions descending', async ({ page }) => {
  337 |     const responsePromise = page.waitForResponse(resp => {
  338 |       if (!resp.url().includes('/api/graphql')) return false;
  339 |       if (resp.request().method() !== 'POST') return false;
  340 |       const body = resp.request().postData() || '';
  341 |       return body.includes('browseEntities');
  342 |     }, { timeout: DATA_LOAD_TIMEOUT });
  343 | 
  344 |     await page.goto(DISTRICT_PATH);
  345 |     const response = await responsePromise;
  346 | 
  347 |     const json = await response.json();
  348 |     const results = json.data?.browseEntities?.results || [];
  349 |     expect(results.length).toBeGreaterThan(1);
  350 | 
  351 |     const contributions = results.map((r: { metadata?: string }) => {
  352 |       try {
  353 |         const meta = JSON.parse(r.metadata || '{}');
  354 |         return meta.total_contributions || 0;
  355 |       } catch { return 0; }
  356 |     });
  357 | 
  358 |     for (let i = 1; i < contributions.length; i++) {
  359 |       expect(contributions[i - 1]).toBeGreaterThanOrEqual(contributions[i]);
  360 |     }
  361 |   });
  362 | });
  363 | 
  364 | // Helper to intercept browseEntities GraphQL response and extract score values
  365 | async function getBrowseScores(page: import('@playwright/test').Page, url: string): Promise<number[]> {
  366 |   const responsePromise = page.waitForResponse(resp => {
  367 |     if (!resp.url().includes('/api/graphql')) return false;
  368 |     if (resp.request().method() !== 'POST') return false;
  369 |     const body = resp.request().postData() || '';
  370 |     return body.includes('browseEntities');
  371 |   }, { timeout: DATA_LOAD_TIMEOUT });
  372 |   await page.goto(url);
  373 |   const response = await responsePromise;
  374 |   const json = await response.json();
  375 |   const results = json.data?.browseEntities?.results || [];
  376 |   return results.map((r: { score?: number }) => r.score || 0);
  377 | }
  378 | 
  379 | test.describe('entity browse sort order - quantitative fields', () => {
  380 | 
  381 |   test('candidates sorted by total contributions descending', async ({ page }) => {
  382 |     const scores = await getBrowseScores(page, '/candidates/');
  383 |     expect(scores.length).toBeGreaterThan(1);
  384 |     for (let i = 1; i < scores.length; i++) {
  385 |       expect(scores[i - 1]).toBeGreaterThanOrEqual(scores[i]);
  386 |     }
  387 |   });
  388 | 
  389 |   test('committees sorted by total receipts descending', async ({ page }) => {
  390 |     const scores = await getBrowseScores(page, '/committees/');
  391 |     expect(scores.length).toBeGreaterThan(1);
  392 |     for (let i = 1; i < scores.length; i++) {
  393 |       expect(scores[i - 1]).toBeGreaterThanOrEqual(scores[i]);
  394 |     }
  395 |   });
  396 | 
  397 |   test('vendors sorted by total received descending', async ({ page }) => {
  398 |     const scores = await getBrowseScores(page, '/vendors/');
  399 |     expect(scores.length).toBeGreaterThan(1);
  400 |     for (let i = 1; i < scores.length; i++) {
  401 |       expect(scores[i - 1]).toBeGreaterThanOrEqual(scores[i]);
  402 |     }
  403 |   });
  404 | 
  405 |   test('individuals sorted by total contributions descending', async ({ page }) => {
  406 |     const scores = await getBrowseScores(page, '/individuals/');
  407 |     expect(scores.length).toBeGreaterThan(1);
  408 |     // A stale search index scores every donor 0 and the order means nothing.
> 409 |     expect(scores[0], 'top individual donor should have contributions').toBeGreaterThan(0);
      |                                                                         ^ Error: top individual donor should have contributions
  410 |     for (let i = 1; i < scores.length; i++) {
  411 |       expect(scores[i - 1]).toBeGreaterThanOrEqual(scores[i]);
  412 |     }
  413 |   });
  414 | 
  415 |   test('employers sorted by total employee contributions descending', async ({ page }) => {
  416 |     const scores = await getBrowseScores(page, '/employers/');
  417 |     expect(scores.length).toBeGreaterThan(1);
  418 |     for (let i = 1; i < scores.length; i++) {
  419 |       expect(scores[i - 1]).toBeGreaterThanOrEqual(scores[i]);
  420 |     }
  421 |   });
  422 | });
  423 | 
  424 | test.describe('us.elect.info entity sections - additional index + detail', () => {
  425 | 
  426 |   test('employers section - index and random pages', async ({ page }) => {
  427 |     const indexResponse = await page.goto('/employers/');
  428 |     expect(indexResponse?.status(), '/employers/ should answer 200').toBe(200);
  429 |     await expect(page.locator('h1')).toContainText(/Employers/i);
  430 | 
  431 |     await expect(page.locator('.entity-search-result').first()).toBeVisible({ timeout: DATA_LOAD_TIMEOUT });
  432 | 
  433 |     const links = await page.locator('.entity-search-result').all();
  434 |     expect(links.length).toBeGreaterThan(0);
  435 | 
  436 |     const hrefs = await Promise.all(links.slice(0, 20).map(l => l.getAttribute('href')));
  437 |     const randomLinks = getRandomItems(hrefs.filter(Boolean) as string[], 3);
  438 | 
  439 |     for (const href of randomLinks) {
  440 |       const entityResponse = await page.goto(toRelativePath(href));
  441 |       expect(entityResponse?.status(), `${toRelativePath(href)} should answer 200`).toBe(200);
  442 |       await expect(page.locator('h1')).toBeVisible();
  443 |     }
  444 |   });
  445 | 
  446 |   test('vendors section - index and random pages', async ({ page }) => {
  447 |     const indexResponse = await page.goto('/vendors/');
  448 |     expect(indexResponse?.status(), '/vendors/ should answer 200').toBe(200);
  449 |     await expect(page.locator('h1')).toContainText(/Vendors/i);
  450 | 
  451 |     await expect(page.locator('.entity-search-result').first()).toBeVisible({ timeout: DATA_LOAD_TIMEOUT });
  452 | 
  453 |     const links = await page.locator('.entity-search-result').all();
  454 |     expect(links.length).toBeGreaterThan(0);
  455 | 
  456 |     const hrefs = await Promise.all(links.slice(0, 20).map(l => l.getAttribute('href')));
  457 |     const randomLinks = getRandomItems(hrefs.filter(Boolean) as string[], 3);
  458 | 
  459 |     for (const href of randomLinks) {
  460 |       const entityResponse = await page.goto(toRelativePath(href));
  461 |       expect(entityResponse?.status(), `${toRelativePath(href)} should answer 200`).toBe(200);
  462 |       await expect(page.locator('h1')).toBeVisible();
  463 |     }
  464 |   });
  465 | 
  466 |   test('counties section - index and random detail pages', async ({ page }) => {
  467 |     await page.goto('/counties/');
  468 | 
  469 |     // Map view is default — verify Leaflet map renders with GeoJSON state shapes
  470 |     await expect(page.locator('#map.leaflet-container')).toBeVisible({ timeout: DATA_LOAD_TIMEOUT });
  471 |     await expect(page.locator('#map .leaflet-interactive').first()).toBeVisible({ timeout: DATA_LOAD_TIMEOUT });
  472 |     const shapes = await page.locator('#map .leaflet-interactive').all();
  473 |     expect(shapes.length).toBeGreaterThan(0);
  474 | 
  475 |     // Switch to List view to test county results and detail navigation
  476 |     await page.locator('.toggle-btn[data-view="list"]').click();
  477 | 
  478 |     // Wait for results to load
  479 |     await page.waitForSelector('.county-result, .county-error', { timeout: DATA_LOAD_TIMEOUT });
  480 |     const results = await page.locator('.county-result').all();
  481 |     expect(results.length).toBeGreaterThan(0);
  482 | 
  483 |     // County results are <a> tags - pick random ones and visit detail pages
  484 |     const hrefs = await Promise.all(results.slice(0, 20).map(r => r.getAttribute('href')));
  485 |     const randomLinks = getRandomItems(hrefs.filter(Boolean) as string[], 3);
  486 | 
  487 |     for (const href of randomLinks) {
  488 |       const entityResponse = await page.goto(toRelativePath(href));
  489 |       expect(entityResponse?.status(), `${toRelativePath(href)} should answer 200`).toBe(200);
  490 |       await expect(page.locator('h1')).toBeVisible();
  491 |     }
  492 |   });
  493 | 
  494 |   test('places section - index and random detail pages', async ({ page }) => {
  495 |     await page.goto('/places/');
  496 | 
  497 |     // Map view is default — verify Leaflet map renders with GeoJSON state shapes
  498 |     await expect(page.locator('#map.leaflet-container')).toBeVisible({ timeout: DATA_LOAD_TIMEOUT });
  499 |     await expect(page.locator('#map .leaflet-interactive').first()).toBeVisible({ timeout: DATA_LOAD_TIMEOUT });
  500 |     const shapes = await page.locator('#map .leaflet-interactive').all();
  501 |     expect(shapes.length).toBeGreaterThan(0);
  502 | 
  503 |     // Switch to List view to test place results and detail navigation
  504 |     await page.locator('.toggle-btn[data-view="list"]').click();
  505 | 
  506 |     // Wait for results to load
  507 |     await page.waitForSelector('.place-result, .place-error', { timeout: DATA_LOAD_TIMEOUT });
  508 |     const results = await page.locator('.place-result').all();
  509 |     expect(results.length).toBeGreaterThan(0);
```