-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from fhlavac/main
fix(tests): Add ErrorState tests
- Loading branch information
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
packages/module/src/DetailsPageHeader/DetailsPageHeader.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Page/__tests__/ErrorBoundaryPage.test.tsx → ...orBoundaryPage/ErrorBoundaryPage.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as React from 'react'; | ||
import ErrorState from './ErrorState'; | ||
import { render, screen } from '@testing-library/react'; | ||
|
||
describe('ErrorState component', () => { | ||
|
||
it('should render correctly', () => { | ||
render(<ErrorState errorTitle='A Basic Error' errorDescription='The following is an example of a basic error' />); | ||
|
||
expect(screen.getByText('A Basic Error')).toBeVisible(); | ||
expect(screen.getByText('The following is an example of a basic error')).toBeVisible(); | ||
expect(screen.getByText('Go to home page')).toBeVisible(); | ||
}); | ||
|
||
it('should render correctly with default props', () => { | ||
render(<ErrorState />); | ||
|
||
expect(screen.getByText('Something went wrong')).toBeVisible(); | ||
expect(screen.getByText('Go to home page')).toBeVisible(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters