Skip to content

Commit

Permalink
Fix: Failing tests (#2144)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome authored Oct 3, 2022
1 parent f3ee749 commit 75a0606
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
33 changes: 33 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"eslint": "8.21.0",
"html-webpack-plugin": "5.5.0",
"jest": "28.1.0",
"jest-canvas-mock": "2.4.0",
"jest-environment-jsdom": "28.1.3",
"jest-fetch-mock": "3.0.3",
"jest-sonar-reporter": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/App.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe('App rendering', () => {
it('should render the permissions tab and its children when the modify permissions tab is clicked', async () => {
const user = userEvent.setup();
renderApp({mobileScreen: false, showSidebar: true});
const modifyPermissionsTab = screen.getByRole('tab', { name: /modify permissions \(preview\)/i});
const modifyPermissionsTab = screen.getByRole('tab', { name: /modify permissions/i });
await user.click(modifyPermissionsTab);
expect(screen.getByText(/Permissions for the query are missing on this tab/i)).toBeDefined();
});
Expand Down
1 change: 1 addition & 0 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { GlobalWithFetchMock } from 'jest-fetch-mock';
import 'jest-canvas-mock';

const customGlobal: GlobalWithFetchMock = global as unknown as GlobalWithFetchMock;
customGlobal.fetch = require('jest-fetch-mock'); // tslint:disable-line
Expand Down

0 comments on commit 75a0606

Please sign in to comment.