Skip to content

Commit

Permalink
Upgrade package @testing-library/user-event from 12.8.3 to 13.5.0
Browse files Browse the repository at this point in the history
-solve failing tests resulting from upgrade testing-library/user-event'
  • Loading branch information
mohamedrehan1 committed Nov 25, 2024
1 parent d62dc3d commit 0dceb82
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"@babel/preset-typescript": "^7.26.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^12.1.10",
"@testing-library/user-event": "^13.5.0",
"@types/inquirer": "^9.0.7",
"@types/jest": "^26.0.24",
"@types/js-cookie": "^3.0.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ const renderActionItemCategories = (
describe('Testing Organisation Action Item Categories', () => {
it('should render the Action Item Categories Screen', async () => {
renderActionItemCategories(link1, 'orgId');
await waitFor(() => {
await waitFor(async () => {
expect(screen.getByTestId('searchByName')).toBeInTheDocument();
expect(screen.getByText('Category 1')).toBeInTheDocument();
expect(screen.getByText('Category 2')).toBeInTheDocument();
expect(await screen.findByText('Category 1')).toBeInTheDocument();
expect(await screen.findByText('Category 2')).toBeInTheDocument();
});
});

Expand Down
6 changes: 3 additions & 3 deletions src/screens/UserPortal/Pledges/Pledge.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ describe('Testing User Pledge Screen', () => {

it('should render the Campaign Pledge screen', async () => {
renderMyPledges(link1);
await waitFor(() => {
await waitFor(async () => {
expect(screen.getByTestId('searchPledges')).toBeInTheDocument();
expect(screen.getByText('Harve Lance')).toBeInTheDocument();
expect(screen.getByText('John Doe')).toBeInTheDocument();
expect(await screen.findByText('Harve Lance')).toBeInTheDocument();
expect(await screen.findByText('John Doe')).toBeInTheDocument();
});
});

Expand Down

0 comments on commit 0dceb82

Please sign in to comment.