Skip to content

Commit

Permalink
fix: Fixed home tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Nov 21, 2023
1 parent ea87f72 commit c2068bb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/group/components/GroupList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import _ from 'lodash/fp';
import { act } from 'react-dom/test-utils';
import { useSearchParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
Expand Down
33 changes: 20 additions & 13 deletions src/home/components/Home.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ test('Home: Display groups', async () => {
id: 'id-1',
slug: 'id-1',
name: 'Group 1',
accountMembership: {
userRole: 'member',
membershipStatus: 'APPROVED',
membershipList: {
accountMembership: {
id: 'id-1',
userRole: 'member',
membershipStatus: 'APPROVED',
},
},
},
},
Expand All @@ -132,25 +135,29 @@ test('Home: Display groups', async () => {
id: 'id-2',
slug: 'id-2',
name: 'Group 2',
accountMembership: {
userRole: 'manager',
membershipStatus: 'APPROVED',
membershipList: {
accountMembership: {
id: 'id-2',
userRole: 'manager',
membershipStatus: 'APPROVED',
},
pending: { totalCount: 1 },
},

pending: { totalCount: 1 },
},
},
{
node: {
id: 'id-3',
slug: 'id-3',
name: 'Group 3',
accountMembership: {
userRole: 'member',
membershipStatus: 'PENDING',
membershipList: {
accountMembership: {
id: 'id-3',
userRole: 'member',
membershipStatus: 'PENDING',
},
pending: { totalCount: 1 },
},

pending: { totalCount: 1 },
},
},
],
Expand Down

0 comments on commit c2068bb

Please sign in to comment.