Skip to content

Commit

Permalink
test id for loading indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarlandian committed Mar 30, 2021
1 parent 446cb20 commit 84d0cfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spotlight-client/src/Loading/Loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const LoadingSpinnerText = styled.div`

export default function Loading(): JSX.Element {
return (
<LoadingWrapper role="status">
<LoadingWrapper role="status" data-testid="LoadingIndicator">
<LoadingSpinnerIcon />
<LoadingSpinnerText>Data is loading</LoadingSpinnerText>
</LoadingWrapper>
Expand Down
4 changes: 1 addition & 3 deletions spotlight-client/src/ModelHydrator/ModelHydrator.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ test("hydrated", async () => {
});

await waitFor(() => {
expect(
screen.queryByRole("status", { hidden: true })
).not.toBeInTheDocument();
expect(screen.queryByTestId("LoadingIndicator")).not.toBeInTheDocument();
expect(screen.getByText("hydrated")).toBeInTheDocument();
});
});
Expand Down

0 comments on commit 84d0cfb

Please sign in to comment.