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 793a09e commit e2ef378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/component/page/pet/update.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ test('successful', async () => {
const { container } = render(
<MemoryRouter initialEntries={['/pet/4d783b77-eb09-4603-b99b-f590b605eaa9/update']}>
<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/:id/update" element={<Update />} />
</Routes>
</MemoryRouter>,
Expand All @@ -230,10 +230,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 e2ef378

Please sign in to comment.