fix(web/m7-365): history page error-state test asserts by role
This commit is contained in:
@@ -99,9 +99,10 @@ describe('library/history page', () => {
|
|||||||
it('renders error banner on isError', () => {
|
it('renders error banner on isError', () => {
|
||||||
mockIsError = true;
|
mockIsError = true;
|
||||||
render(HistoryPage);
|
render(HistoryPage);
|
||||||
// ApiErrorBanner renders generic error copy. The default message
|
// ApiErrorBanner renders a role="alert" container. Assert by role
|
||||||
// it falls back to is "Something went wrong."
|
// rather than by message text, since the message comes from the
|
||||||
expect(screen.getByText(/something went wrong/i)).toBeInTheDocument();
|
// error object's `.message` property and varies.
|
||||||
|
expect(screen.getByRole('alert')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not render the InfiniteScrollSentinel when hasNextPage is false', () => {
|
it('does not render the InfiniteScrollSentinel when hasNextPage is false', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user