Skip to content

Commit

Permalink
Add mock data-testid
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikzogg committed Mar 18, 2024
1 parent 0449e18 commit dbbbe2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/component/page/pet/create.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ test('successful', async () => {
const { container } = render(
<MemoryRouter initialEntries={['/pet/create']}>
<Routes>
<Route path="/pet" element={<div data-testid="page-pet-list" />} />
<Route path="/pet" element={<div data-testid="page-pet-list-mock" />} />
<Route path="/pet/create" element={<Create />} />
</Routes>
</MemoryRouter>,
Expand All @@ -140,10 +140,10 @@ test('successful', async () => {

await userEvent.click(testButton);

await screen.findByTestId('page-pet-list');
await screen.findByTestId('page-pet-list-mock');

expect(formatHtml(container.outerHTML)).toMatchInlineSnapshot(`
"<div><div data-testid="page-pet-list"></div></div>
"<div><div data-testid="page-pet-list-mock"></div></div>
"
`);
});

0 comments on commit dbbbe2c

Please sign in to comment.