# 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/money-flow.spec.ts >> money-flow card toggle >> committee: #ie-support card follows the independent-expenditure data
- Location: tests/ui/money-flow.spec.ts:78:9

# Error details

```
Error: expect(locator).toHaveCount(expected) failed

Locator:  locator('#incoming .mf-toggle')
Expected: 1
Received: 0
Timeout:  15000ms

Call log:
  - Expect "toHaveCount" locator('#incoming .mf-toggle') with timeout 15000ms
  - waiting for locator('#incoming .mf-toggle')
    34 × locator resolved to 0 elements
       - unexpected value "0"

```

# Page snapshot

```yaml
- generic [active] [ref=e1]:
  - banner [ref=e2]:
    - heading "DNC SERVICES CORP / DEMOCRATIC NATIONAL COMMITTEE" [level=1] [ref=e3]
    - paragraph [ref=e4]: Party - Qualified
    - paragraph [ref=e5]: "FEC ID: C00010603"
    - button "Graph" [ref=e6] [cursor=pointer]
  - link "Log In" [ref=e16] [cursor=pointer]:
    - /url: /outpost.goauthentik.io/start?rd=http%3A%2F%2Fpreview-us-elect-info.electinfo.svc.cluster.local%2Fcommittees%2Fa75a9110-f1db-a945-39a8-7503ed3c04da%2F
  - generic [ref=e17]:
    - heading "Overview" [level=2] [ref=e18]
    - generic [ref=e19]:
      - term [ref=e20]: Committee Type
      - definition [ref=e21]: Party - Qualified
      - term [ref=e22]: Designation
      - definition [ref=e23]: U
      - term [ref=e24]: Party Affiliation
      - definition [ref=e25]:
        - link "Democratic Party" [ref=e26] [cursor=pointer]:
          - /url: https://preview.elect.info/parties/democratic/
      - term [ref=e27]: Treasurer
      - definition [ref=e28]: MCGREGOR, VIRGINIA
      - term [ref=e29]: Location
      - definition [ref=e30]:
        - generic [ref=e31]:
          - text: WASHINGTON,
          - link "District of Columbia" [ref=e32] [cursor=pointer]:
            - /url: https://preview.elect.info/states/district-of-columbia/
          - text: "20003"
      - term [ref=e33]: Active Cycles
      - definition [ref=e34]:
        - generic [ref=e35]:
          - link "2026" [ref=e36] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2026/
          - text: ","
          - link "2024" [ref=e37] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2024/
          - text: ","
          - link "2022" [ref=e38] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2022/
          - text: ","
          - link "2020" [ref=e39] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2020/
          - text: ","
          - link "2018" [ref=e40] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2018/
          - text: ","
          - link "2016" [ref=e41] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2016/
          - text: ","
          - link "2014" [ref=e42] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2014/
          - text: ","
          - link "2012" [ref=e43] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2012/
          - text: ","
          - link "2010" [ref=e44] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2010/
          - text: ","
          - link "2008" [ref=e45] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2008/
          - text: ","
          - link "2006" [ref=e46] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2006/
          - text: ","
          - link "2004" [ref=e47] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2004/
          - text: ","
          - link "2002" [ref=e48] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2002/
          - text: ","
          - link "2000" [ref=e49] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/2000/
          - text: ","
          - link "1998" [ref=e50] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1998/
          - text: ","
          - link "1996" [ref=e51] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1996/
          - text: ","
          - link "1994" [ref=e52] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1994/
          - text: ","
          - link "1992" [ref=e53] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1992/
          - text: ","
          - link "1990" [ref=e54] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1990/
          - text: ","
          - link "1988" [ref=e55] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1988/
          - text: ","
          - link "1986" [ref=e56] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1986/
          - text: ","
          - link "1984" [ref=e57] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1984/
          - text: ","
          - link "1982" [ref=e58] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1982/
          - text: ","
          - link "1980" [ref=e59] [cursor=pointer]:
            - /url: https://preview.elect.info/elections/1980/
      - term [ref=e60]: Party Affinity
      - definition [ref=e61]:
        - generic [ref=e62]:
          - link "Democratic Party" [ref=e63] [cursor=pointer]:
            - /url: https://preview.elect.info/parties/democratic/
          - text: ": 81%"
          - link "Republican Party" [ref=e64] [cursor=pointer]:
            - /url: https://preview.elect.info/parties/republican/
          - text: ": 19%"
  - generic [ref=e65]:
    - heading "Financial Summary" [level=2] [ref=e66]
    - generic [ref=e67]:
      - term [ref=e68]: Total Receipts
      - definition [ref=e69]:
        - strong [ref=e70]: $4505.2M
      - term [ref=e71]: Total Disbursements
      - definition [ref=e72]: $4489.7M
  - generic [ref=e73]:
    - heading "Connected Organizations" [level=2] [ref=e74]
    - generic [ref=e75]:
      - term [ref=e76]: Connected Organization
      - definition [ref=e77]: DEMOCRATIC GRASSROOTS VICTORY FUND
  - generic [ref=e79]:
    - heading "Candidates Funded" [level=2] [ref=e80]
    - paragraph [ref=e81]: "Candidates receiving contributions from this committee:"
    - list [ref=e82]:
      - listitem [ref=e83]:
        - link "BIDEN, JOSEPH R JR" [ref=e84] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/joseph-r-jr-biden-p80000722/
        - text: $42.6M (374 contributions) [2024, 2020, 2026, 2022]
      - listitem [ref=e85]:
        - link "OBAMA, BARACK / JOSEPH R. BIDEN" [ref=e86] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/barack-joseph-r-biden-obama-p80003338/
        - text: $28.3M (283 contributions) [2010, 2014, 2012, 2008]
      - listitem [ref=e87]:
        - link "CLINTON, HILLARY RODHAM / TIMOTHY MICHAEL KAINE" [ref=e88] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/hillary-rodham-timothy-michael-kaine-clinton-p00003392/
        - text: $23.4M (64 contributions) [2016, 2018]
      - listitem [ref=e89]:
        - link "CLINTON, WILLIAM JEFFERSON" [ref=e90] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/william-jefferson-clinton-p20000642/
        - text: $20.8M (826 contributions) [1996, 1994, 1992, 1998]
      - listitem [ref=e91]:
        - link "KERRY, JOHN F" [ref=e92] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/john-f-kerry-p80000235/
        - text: $16.6M (567 contributions) [2006, 2004]
      - listitem [ref=e93]:
        - link "GORE, AL" [ref=e94] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/al-gore-p80000912/
        - text: $13.9M (419 contributions) [2002, 2000]
      - listitem [ref=e95]:
        - link "DUKAKIS, MICHAEL S" [ref=e96] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/michael-s-dukakis-p80000789/
        - text: $8.0M (117 contributions) [1990, 1992, 1988]
      - listitem [ref=e97]:
        - link "CARTER, JIMMY" [ref=e98] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/jimmy-carter-p60000247/
        - text: $4.3M (999 contributions) [1990, 1984, 1988, 1980, 1986, 1982]
      - listitem [ref=e99]:
        - link "HARRIS, KAMALA" [ref=e100] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/kamala-harris-p00009423/
        - text: $3.8M (39 contributions) [2024, 2026]
      - listitem [ref=e101]:
        - link "MONDALE, WALTER F" [ref=e102] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/walter-f-mondale-p40000267/
        - text: $3.5M (206 contributions) [1984, 1986]
      - listitem [ref=e103]:
        - link "BRAUN, CAROL MOSELEY" [ref=e104] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/carol-moseley-braun-s2il00028/
        - text: $1.0M (116 contributions) [1996, 1994, 1992, 1998]
      - listitem [ref=e105]:
        - link "COLES, MICHAEL J" [ref=e106] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/michael-j-coles-s8ga00099/
        - text: $401K (7 contributions) [1998]
      - listitem [ref=e107]:
        - link "JONES, DOUG" [ref=e108] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/doug-jones-s0al00156/
        - text: $248K (19 contributions) [2018]
      - listitem [ref=e109]:
        - link "MARKEY, EDWARD SEN." [ref=e110] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/edward-markey-s4ma00028/
        - text: $172K (7 contributions) [2014]
      - listitem [ref=e111]:
        - link "GUNTER, BILL" [ref=e112] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/bill-gunter-s4fl00025/
        - text: $111K (3 contributions) [1980]
      - listitem [ref=e113]:
        - link "COAKLEY, MARTHA" [ref=e114] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/martha-coakley-s0ma00075/
        - text: $84K (73 contributions) [2010]
      - listitem [ref=e115]:
        - link "LAMM, DOROTHY V" [ref=e116] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/dorothy-v-lamm-s8co00107/
        - text: $80K (2 contributions) [1998]
      - listitem [ref=e117]:
        - link "WOFFORD, HARRIS L" [ref=e118] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/harris-l-wofford-s2pa00083/
        - text: $76K (3 contributions) [1992]
      - listitem [ref=e119]:
        - link "BIDEN, JR., JOSEPH R." [ref=e120] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/jr-joseph-r-biden-p60012465/
        - text: $61K (2 contributions) [2024]
      - listitem [ref=e121]:
        - link "BENNET, MICHAEL F." [ref=e122] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/michael-f-bennet-s0co00211/
        - text: $57K (4 contributions) [2010]
    - paragraph [ref=e123]: Showing top 20 of 439
  - generic [ref=e124]:
    - heading "Independent Expenditures For" [level=2] [ref=e125]
    - paragraph [ref=e126]: "Candidates this committee spent for, independently of their campaigns (not contributions to the campaigns):"
    - list [ref=e127]:
      - listitem [ref=e128]:
        - link "KERRY, JOHN F" [ref=e129] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/john-f-kerry-p80000235/
        - text: $33.2M (93 expenditures) [2004]
      - listitem [ref=e130]:
        - link "MURPHY, SCOTT M" [ref=e131] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/scott-m-murphy-h0ny20079/
        - text: $10K (1 expenditures) [2010]
      - listitem [ref=e132]:
        - link "BALDWIN, TAMMY" [ref=e133] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/tammy-baldwin-h8wi00018/
        - text: $913 (3 expenditures) [2010]
      - listitem [ref=e134]:
        - link "GIANNOULIAS, ALEXANDER" [ref=e135] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/alexander-giannoulias-s0il00204/
        - text: $913 (3 expenditures) [2010]
      - listitem [ref=e136]:
        - link "FRANKEN, AL" [ref=e137] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/al-franken-s8mn00438/
        - text: $913 (3 expenditures) [2010]
      - listitem [ref=e138]:
        - link "BUSH, GEORGE W" [ref=e139] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/george-w-bush-p00003335/
        - text: $0 (1 expenditures) [2006]
    - paragraph [ref=e140]: Showing all 6
  - generic [ref=e141]:
    - heading "Independent Expenditures Against" [level=2] [ref=e142]
    - paragraph [ref=e143]: "Candidates this committee spent against, independently of their campaigns:"
    - list [ref=e144]:
      - listitem [ref=e145]:
        - link "BUSH, GEORGE W" [ref=e146] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/george-w-bush-p00003335/
        - text: $87.2M (89 expenditures) [2004]
      - listitem [ref=e147]:
        - link "MCCAIN, JOHN S." [ref=e148] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/john-s-mccain-p80002801/
        - text: $1.1M (10 expenditures) [2010, 2008]
      - listitem [ref=e149]:
        - link "DEMINT, JAMES W" [ref=e150] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/james-w-demint-s4sc00083/
        - text: $913 (3 expenditures) [2010]
      - listitem [ref=e151]:
        - link "O'DONNELL, CHRISTINE" [ref=e152] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/christine-odonnell-s6de00131/
        - text: $913 (3 expenditures) [2010]
      - listitem [ref=e153]:
        - link "KERRY, JOHN F" [ref=e154] [cursor=pointer]:
          - /url: https://preview.elect.info/candidates/john-f-kerry-p80000235/
        - text: $0 (1 expenditures) [2006]
    - paragraph [ref=e155]: Showing all 5
  - generic [ref=e156]:
    - heading "Committees Funded" [level=2] [ref=e157]
    - paragraph [ref=e158]: "Committees receiving transfers from this committee:"
    - list [ref=e159]:
      - listitem [ref=e160]:
        - link "HARRIS VICTORY FUND" [ref=e161] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/harris-victory-fund-c00744946/
        - text: $333.7M (83 transfers)
      - listitem [ref=e162]:
        - link "OBAMA VICTORY FUND 2012" [ref=e163] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/obama-victory-fund-2012-c00494740/
        - text: $126.5M (44 transfers)
      - listitem [ref=e164]:
        - link "HILLARY VICTORY FUND" [ref=e165] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/hillary-victory-fund-c00586537/
        - text: $108.3M (43 transfers)
      - listitem [ref=e166]:
        - link "PENNSYLVANIA DEMOCRATIC PARTY" [ref=e167] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/pennsylvania-democratic-party-c00167130/
        - text: $97.6M (1,290 transfers)
      - listitem [ref=e168]:
        - link "DEMOCRATIC EXECUTIVE COMMITTEE OF FLORIDA" [ref=e169] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/democratic-executive-committee-of-florida-c00005561/
        - text: $83.6M (1,221 transfers)
      - listitem [ref=e170]:
        - link "OBAMA VICTORY FUND" [ref=e171] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/obama-victory-fund-c00451393/
        - text: $70.3M (22 transfers)
      - listitem [ref=e172]:
        - link "DCCC" [ref=e173] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/dccc-c00000935/
        - text: $70.1M (373 transfers)
      - listitem [ref=e174]:
        - link "OHIO DEMOCRATIC PARTY - FEDERAL" [ref=e175] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/ohio-democratic-party-federal-c00016899/
        - text: $68.0M (1,236 transfers)
      - listitem [ref=e176]:
        - link "MICHIGAN DEMOCRATIC STATE CENTRAL COMMITTEE" [ref=e177] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/michigan-democratic-state-central-committee-c00031054/
        - text: $64.2M (1,190 transfers)
      - listitem [ref=e178]:
        - link "DSCC" [ref=e179] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/dscc-c00042366/
        - text: $63.3M (160 transfers)
      - listitem [ref=e180]:
        - link "NORTH CAROLINA DEMOCRATIC PARTY - FEDERAL" [ref=e181] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/north-carolina-democratic-party-federal-c00165688/
        - text: $56.1M (991 transfers)
      - listitem [ref=e182]:
        - link "HARRIS ACTION FUND" [ref=e183] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/harris-action-fund-c00838912/
        - text: $51.9M (14 transfers)
      - listitem [ref=e184]:
        - link "DEMOCRATIC PARTY OF WISCONSIN FEDERAL" [ref=e185] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/democratic-party-of-wisconsin-federal-c00019331/
        - text: $48.8M (1,151 transfers)
      - listitem [ref=e186]:
        - link "DEMOCRATIC PARTY OF VIRGINIA" [ref=e187] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/democratic-party-of-virginia-c00155952/
        - text: $47.4M (1,037 transfers)
      - listitem [ref=e188]:
        - link "BIDEN ACTION FUND" [ref=e189] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/biden-action-fund-c00746651/
        - text: $46.5M (21 transfers)
      - listitem [ref=e190]:
        - link "DEMOCRATIC GRASSROOTS VICTORY FUND" [ref=e191] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/democratic-grassroots-victory-fund-c00658476/
        - text: $42.9M (103 transfers)
      - listitem [ref=e192]:
        - link "NEVADA STATE DEMOCRATIC PARTY" [ref=e193] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/nevada-state-democratic-party-c00208991/
        - text: $40.3M (1,344 transfers)
      - listitem [ref=e194]:
        - link "HILLARY ACTION FUND" [ref=e195] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/hillary-action-fund-c00619411/
        - text: $39.5M (47 transfers)
      - listitem [ref=e196]:
        - link "GEORGIA FEDERAL ELECTIONS COMMITTEE" [ref=e197] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/georgia-federal-elections-committee-c00041269/
        - text: $34.9M (891 transfers)
      - listitem [ref=e198]:
        - 'link "FEDERAL: COLORADO DEMOCRATIC PARTY" [ref=e199] [cursor=pointer]':
          - /url: https://preview.elect.info/committees/federal-colorado-democratic-party-c00161786/
        - text: $34.5M (993 transfers)
    - paragraph [ref=e200]: Showing top 20 of 1,646
  - generic [ref=e201]:
    - heading "Funded By" [level=2] [ref=e202]
    - paragraph [ref=e203]: "Committees that have transferred funds to this committee:"
    - list [ref=e204]:
      - listitem [ref=e205]:
        - link "HARRIS VICTORY FUND" [ref=e206] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/harris-victory-fund-c00744946/
        - text: $349.3M (108 transfers)
      - listitem [ref=e207]:
        - link "OBAMA VICTORY FUND 2012" [ref=e208] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/obama-victory-fund-2012-c00494740/
        - text: $103.7M (41 transfers)
      - listitem [ref=e209]:
        - link "PENNSYLVANIA DEMOCRATIC PARTY" [ref=e210] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/pennsylvania-democratic-party-c00167130/
        - text: $97.1M (1,457 transfers)
      - listitem [ref=e211]:
        - link "DEMOCRATIC EXECUTIVE COMMITTEE OF FLORIDA" [ref=e212] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/democratic-executive-committee-of-florida-c00005561/
        - text: $77.6M (1,346 transfers)
      - listitem [ref=e213]:
        - link "HILLARY VICTORY FUND" [ref=e214] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/hillary-victory-fund-c00586537/
        - text: $77.4M (49 transfers)
      - listitem [ref=e215]:
        - link "DEMOCRATIC PARTY OF VIRGINIA" [ref=e216] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/democratic-party-of-virginia-c00155952/
        - text: $71.8M (1,195 transfers)
      - listitem [ref=e217]:
        - link "OBAMA VICTORY FUND" [ref=e218] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/obama-victory-fund-c00451393/
        - text: $70.3M (22 transfers)
      - listitem [ref=e219]:
        - link "OHIO DEMOCRATIC PARTY - FEDERAL" [ref=e220] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/ohio-democratic-party-federal-c00016899/
        - text: $69.8M (1,288 transfers)
      - listitem [ref=e221]:
        - link "DCCC" [ref=e222] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/dccc-c00000935/
        - text: $68.4M (134 transfers)
      - listitem [ref=e223]:
        - link "DSCC" [ref=e224] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/dscc-c00042366/
        - text: $65.7M (161 transfers)
      - listitem [ref=e225]:
        - link "MICHIGAN DEMOCRATIC STATE CENTRAL COMMITTEE" [ref=e226] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/michigan-democratic-state-central-committee-c00031054/
        - text: $63.4M (1,272 transfers)
      - listitem [ref=e227]:
        - link "NORTH CAROLINA DEMOCRATIC PARTY - FEDERAL" [ref=e228] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/north-carolina-democratic-party-federal-c00165688/
        - text: $56.2M (1,221 transfers)
      - listitem [ref=e229]:
        - link "HARRIS ACTION FUND" [ref=e230] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/harris-action-fund-c00838912/
        - text: $51.4M (13 transfers)
      - listitem [ref=e231]:
        - link "DEMOCRATIC PARTY OF WISCONSIN FEDERAL" [ref=e232] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/democratic-party-of-wisconsin-federal-c00019331/
        - text: $50.6M (1,272 transfers)
      - listitem [ref=e233]:
        - link "BIDEN ACTION FUND" [ref=e234] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/biden-action-fund-c00746651/
        - text: $46.5M (23 transfers)
      - listitem [ref=e235]:
        - link "NEVADA STATE DEMOCRATIC PARTY" [ref=e236] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/nevada-state-democratic-party-c00208991/
        - text: $37.8M (1,072 transfers)
      - listitem [ref=e237]:
        - link "GEORGIA FEDERAL ELECTIONS COMMITTEE" [ref=e238] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/georgia-federal-elections-committee-c00041269/
        - text: $36.9M (1,050 transfers)
      - listitem [ref=e239]:
        - 'link "FEDERAL: COLORADO DEMOCRATIC PARTY" [ref=e240] [cursor=pointer]':
          - /url: https://preview.elect.info/committees/federal-colorado-democratic-party-c00161786/
        - text: $35.0M (1,046 transfers)
      - listitem [ref=e241]:
        - link "DEMOCRATIC GRASSROOTS VICTORY FUND" [ref=e242] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/democratic-grassroots-victory-fund-c00658476/
        - text: $32.4M (74 transfers)
      - listitem [ref=e243]:
        - link "IOWA DEMOCRATIC PARTY" [ref=e244] [cursor=pointer]:
          - /url: https://preview.elect.info/committees/iowa-democratic-party-c00035600/
        - text: $31.4M (1,214 transfers)
    - paragraph [ref=e245]: Showing top 20 of 2,261
  - contentinfo [ref=e246]:
    - paragraph [ref=e247]:
      - link "elect.info" [ref=e248] [cursor=pointer]:
        - /url: https://preview.elect.info/
      - text: "| Data from"
      - link "Federal Election Commission" [ref=e249] [cursor=pointer]:
        - /url: https://preview.elect.info/datasources/fec_bulk/
      - text: "| Generated 2026-10-13"
```

# Test source

```ts
  1   | import { test, expect } from '@playwright/test';
  2   | 
  3   | // Money-flow Sankey (electinfo/sites#178). nginx injects /js/money-flow.js
  4   | // into Candidate and Committee detail pages served from the static-pages
  5   | // mount; the us-pages renderer (sites#210, on preview) writes the same tag
  6   | // into the pages it renders. The script fetches moneyFlow from /api/graphql and gives each money
  7   | // card a Sankey | Table toggle, Sankey by default.
  8   | //
  9   | // Every us target has these pages and a moneyFlow API: the CI test pod mounts
  10  | // the production static pages and proxies to api-graphql, and preview serves
  11  | // beta-pages through api-graphql-preview. So the specs run everywhere, on the
  12  | // DNC and Harris pages, and check that no other kind of page gets the script.
  13  | 
  14  | const SCRIPT = '<script src="/js/money-flow.js" defer></script>';
  15  | const DNC = '/committees/a75a9110-f1db-a945-39a8-7503ed3c04da/'; // C00010603
  16  | const HARRIS = '/candidates/a8897257-430c-2bf3-4498-349021b09ca3/'; // P00009423
  17  | const OTHER_PAGES = [
  18  |   '/states/032f8d61-f554-f435-2a6d-50b3c8cc01d7/', // AK
  19  |   '/elections/2024/',
  20  |   '/offices/president/',
  21  |   '/districts/ak/00/',
  22  | ];
  23  | 
  24  | test.describe('money-flow script injection', () => {
  25  |   for (const path of [DNC, HARRIS]) {
  26  |     test(`injected once on ${path}`, async ({ request }) => {
  27  |       const res = await request.get(path);
  28  |       expect(res.status()).toBe(200);
  29  |       const html = await res.text();
  30  |       expect(html.split(SCRIPT).length - 1).toBe(1);
  31  |     });
  32  |   }
  33  | 
  34  |   for (const path of OTHER_PAGES) {
  35  |     test(`not injected on ${path}`, async ({ request }) => {
  36  |       const res = await request.get(path);
  37  |       expect(res.status()).toBe(200);
  38  |       expect(await res.text()).not.toContain('money-flow.js');
  39  |     });
  40  |   }
  41  | });
  42  | 
  43  | test.describe('money-flow card toggle', () => {
  44  |   test('committee: each money card defaults to the Sankey', async ({ page }) => {
  45  |     const errors: string[] = [];
  46  |     page.on('pageerror', (e) => errors.push(String(e)));
  47  |     await page.goto(DNC);
  48  |     for (const id of ['incoming', 'outgoing', 'funded']) {
  49  |       const card = page.locator(`#${id}`);
  50  |       await expect(card.locator('.money-flow-chart canvas')).toHaveCount(1, { timeout: 15000 });
  51  |       await expect(card.locator('.mf-view-btn[data-view="sankey"]')).toHaveAttribute('aria-pressed', 'true');
  52  |       await expect(card.locator('ul.candidate-list')).toBeHidden();
  53  |     }
  54  |     await expect(page.locator('#supported .mf-toggle')).toHaveCount(0);
  55  |     expect(errors).toEqual([]);
  56  |   });
  57  | 
  58  |   test('candidate: Top Contributors toggles between Sankey and table', async ({ page }) => {
  59  |     await page.goto(HARRIS);
  60  |     const card = page.locator('#funding');
  61  |     await expect(card.locator('.money-flow-chart canvas')).toHaveCount(1, { timeout: 15000 });
  62  |     await expect(card.locator('table')).toBeHidden();
  63  |     await card.locator('.mf-view-btn[data-view="table"]').click();
  64  |     await expect(card.locator('table')).toBeVisible();
  65  |     await expect(card.locator('.money-flow-chart')).toBeHidden();
  66  |     await expect(card.locator('.mf-view-btn[data-view="table"]')).toHaveAttribute('aria-pressed', 'true');
  67  |   });
  68  | 
  69  |   // Independent expenditures (rundeck#757): each card is a Sankey once the graph
  70  |   // has IE_SUPPORTS / IE_OPPOSES edges, and keeps its static list until then.
  71  |   // Pages generated before the sections existed have none to mount.
  72  |   for (const [label, path, fecId, sectionId, side] of [
  73  |     ['candidate', HARRIS, 'P00009423', 'ie-support', 'ie-in'],
  74  |     ['committee', DNC, 'C00010603', 'ie-support', 'ie-out'],
  75  |     ['candidate', HARRIS, 'P00009423', 'ie-oppose', 'ie-opp-in'],
  76  |     ['committee', DNC, 'C00010603', 'ie-oppose', 'ie-opp-out'],
  77  |   ] as const) {
  78  |     test(`${label}: #${sectionId} card follows the independent-expenditure data`, async ({ page, request }) => {
  79  |       const errors: string[] = [];
  80  |       page.on('pageerror', (e) => errors.push(String(e)));
  81  |       const res = await request.post('/api/graphql', {
  82  |         data: { query: 'query($f: String!) { moneyFlow(fecId: $f) { nodes { side } } }', variables: { f: fecId } },
  83  |       });
  84  |       const nodes: { side: string }[] = (await res.json())?.data?.moneyFlow?.nodes ?? [];
  85  |       const ieNodes = nodes.filter((n) => n.side === side).length;
  86  | 
  87  |       await page.goto(path);
  88  |       const card = page.locator(`#${sectionId}`);
  89  |       // the contribution cards are mounted first, so wait for them before judging the IE card
> 90  |       await expect(page.locator(label === 'candidate' ? '#funding .mf-toggle' : '#incoming .mf-toggle')).toHaveCount(1, { timeout: 15000 });
      |                                                                                                          ^ Error: expect(locator).toHaveCount(expected) failed
  91  |       if ((await card.count()) === 0) {
  92  |         expect(errors).toEqual([]);
  93  |         return;
  94  |       }
  95  |       const list = card.locator(label === 'candidate' ? 'table' : 'ul.candidate-list');
  96  |       if (ieNodes > 0) {
  97  |         await expect(card.locator('.money-flow-chart canvas')).toHaveCount(1, { timeout: 15000 });
  98  |         await expect(list).toBeHidden();
  99  |       } else {
  100 |         await expect(card.locator('.mf-toggle')).toHaveCount(0);
  101 |         await expect(list).toBeVisible();
  102 |       }
  103 |       expect(errors).toEqual([]);
  104 |     });
  105 |   }
  106 | });
  107 | 
```