Skip to content

Commit 9c1f178

Browse files
committed
find buttons before click
1 parent e042222 commit 9c1f178

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/solid-router/tests/optional-path-params.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,19 +647,19 @@ describe('Solid Router - Optional Path Parameters', () => {
647647

648648
// Test navigation scenarios
649649
const navigateAll = await screen.findByTestId('navigate-all')
650-
const navigateTech = await screen.findByTestId('navigate-tech')
651-
const navigateSpecific = await screen.findByTestId('navigate-specific')
652650

653651
fireEvent.click(navigateAll)
654652
await waitFor(() => {
655653
expect(router.state.location.pathname).toBe('/posts')
656654
})
657655

656+
const navigateTech = await screen.findByTestId('navigate-tech')
658657
fireEvent.click(navigateTech)
659658
await waitFor(() => {
660659
expect(router.state.location.pathname).toBe('/posts/tech')
661660
})
662661

662+
const navigateSpecific = await screen.findByTestId('navigate-specific')
663663
fireEvent.click(navigateSpecific)
664664
await waitFor(() => {
665665
expect(router.state.location.pathname).toBe('/posts/tech/hello-world')

0 commit comments

Comments
 (0)