Skip to content

Commit

Permalink
fixup! Fix tests broken by not running prettier
Browse files Browse the repository at this point in the history
This reverts commit ccb01c6.
  • Loading branch information
canac committed Apr 26, 2024
1 parent 15d3874 commit b8d9086
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('MonthlyCommitment', () => {
await waitForNextUpdate();
expect(
result.current.data?.reportPledgeHistories?.length,
).toMatchInlineSnapshot(`2`);
).toMatchInlineSnapshot(`3`);
});

it('renders', async () => {
Expand Down
115 changes: 47 additions & 68 deletions src/components/Coaching/LoadCoachingList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,98 +23,77 @@ describe('LoadCoaching', () => {
"nodes": Array [
Object {
"__typename": "CoachingAccountList",
"balance": 11.791526267834396,
"currency": "Guitar Library Rifle",
"id": "5832188",
"monthlyGoal": 21,
"name": "Carrot",
"balance": 26.507845354363234,
"currency": "Kitchen Star Restaurant",
"id": "7671408",
"monthlyGoal": 32,
"name": "Diamond Sword Restaurant",
"primaryAppeal": Object {
"__typename": "CoachingAppeal",
"active": false,
"amount": 28.83519342649578,
"amountCurrency": "Bottle",
"id": "5458428",
"name": "Eraser Highway Roof",
"pledgesAmountNotReceivedNotProcessed": 37.112908798919825,
"pledgesAmountProcessed": 63.56730814682465,
"pledgesAmountTotal": 84.93122600789155,
"amount": 71.24003484887974,
"amountCurrency": "Gloves Tennis racquet Pebble",
"id": "8018947",
"name": "Rifle Feather Videotape",
"pledgesAmountNotReceivedNotProcessed": 18.46232645104087,
"pledgesAmountProcessed": 12.197856859203839,
"pledgesAmountTotal": 64.55430394702351,
},
"receivedPledges": 74.08939333065162,
"totalPledges": 13.423852176053717,
"receivedPledges": 71.71677620866463,
"totalPledges": 88.38895264618175,
},
Object {
"__typename": "CoachingAccountList",
"balance": 68.90732598759584,
"currency": "Bible Pants Leg",
"id": "7800041",
"monthlyGoal": 19,
"name": "Rock Chocolates",
"balance": 7.701867972597047,
"currency": "Onion Pocket",
"id": "5702668",
"monthlyGoal": 67,
"name": "Circle",
"primaryAppeal": Object {
"__typename": "CoachingAppeal",
"active": false,
"amount": 77.42704485937709,
"amountCurrency": "Milkshake Monster Robot",
"id": "7613202",
"name": "Swimming Pool",
"pledgesAmountNotReceivedNotProcessed": 86.94387223784648,
"pledgesAmountProcessed": 8.44492391072578,
"pledgesAmountTotal": 35.208384953842604,
},
"receivedPledges": 53.58337866990284,
"totalPledges": 93.81817854894618,
},
Object {
"__typename": "CoachingAccountList",
"balance": 49.162810569843316,
"currency": "Triangle Aircraft Carrier",
"id": "5967758",
"monthlyGoal": 44,
"name": "Surveyor",
"primaryAppeal": Object {
"__typename": "CoachingAppeal",
"active": false,
"amount": 5.9485487258884815,
"amountCurrency": "Toilet Television Drum",
"id": "9848811",
"name": "Chair Kaleidoscope",
"pledgesAmountNotReceivedNotProcessed": 82.60587627015204,
"pledgesAmountProcessed": 87.25946719424971,
"pledgesAmountTotal": 47.45366563568286,
"active": true,
"amount": 19.745889235377575,
"amountCurrency": "Bird Typewriter",
"id": "1270780",
"name": "Saddle Chisel Circle",
"pledgesAmountNotReceivedNotProcessed": 66.2952785316502,
"pledgesAmountProcessed": 18.199816964540847,
"pledgesAmountTotal": 72.72060834776661,
},
"receivedPledges": 10.517159591365377,
"totalPledges": 76.96025244782014,
"receivedPledges": 49.79264398185141,
"totalPledges": 54.25736018912712,
},
Object {
"__typename": "CoachingAccountList",
"balance": 39.47558769062159,
"currency": "Liquid",
"id": "371742",
"monthlyGoal": 54,
"name": "Kaleidoscope Church",
"balance": 2.9079667684670696,
"currency": "Bible",
"id": "1688878",
"monthlyGoal": 23,
"name": "Onion Church Car",
"primaryAppeal": Object {
"__typename": "CoachingAppeal",
"active": true,
"amount": 28.47070061288337,
"amountCurrency": "Milkshake",
"id": "6828777",
"name": "Solid Teeth Television",
"pledgesAmountNotReceivedNotProcessed": 43.92947491213468,
"pledgesAmountProcessed": 74.38029693077652,
"pledgesAmountTotal": 55.35687511771611,
"amount": 42.290111917719415,
"amountCurrency": "Necklace Prison",
"id": "761729",
"name": "Software Drum",
"pledgesAmountNotReceivedNotProcessed": 5.751591941256687,
"pledgesAmountProcessed": 71.27233959202866,
"pledgesAmountTotal": 88.88260916797685,
},
"receivedPledges": 13.700071114231635,
"totalPledges": 91.89550085589752,
"receivedPledges": 90.38398155210061,
"totalPledges": 54.133712713605604,
},
],
"pageInfo": Object {
"__typename": "PageInfo",
"endCursor": "Bomb Pebble Sports-car",
"endCursor": "Circus Map",
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "Monster Computer Bowl",
"startCursor": "Boy Wheelchair Data Base",
},
"totalCount": 35,
"totalPageCount": 27,
"totalCount": 95,
"totalPageCount": 23,
}
`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('MassActionsRemoveTagsModal', () => {
it('Clicks on tag to remove it, then saves action', async () => {
const mutationSpy = jest.fn();
const handleClose = jest.fn();
const tagName = 'Baby Worm';
const tagName = 'Circus';
const { getByText } = render(
<ThemeProvider theme={theme}>
<GqlMockedProvider onCall={mutationSpy}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,19 @@ describe('StarTaskIconButton', () => {
);

await waitFor(() =>
expect(mutationSpy).toHaveGraphqlOperation('SetContactStarred', {
accountListId: 'abc',
contactId: '1',
starred: true,
expect(mutationSpy).toHaveBeenCalledWith({
operation: expect.objectContaining({
operationName: 'SetContactStarred',
variables: { accountListId: 'abc', contactId: '1', starred: true },
}),
response: {
data: {
updateContact: {
__typename: 'ContactUpdateMutationPayload',
contact: { __typename: 'Contact', id: '2418942', starred: true },
},
},
},
}),
);
});
Expand Down

0 comments on commit b8d9086

Please sign in to comment.