Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions packages/solid-router/tests/loaders.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ test('reproducer #4245', async () => {
expect(fooLink3).toBeInTheDocument()
})

// TODO - THIS WORKS IN REACT
test.skip('reproducer #4546', async () => {
test('reproducer #4546', async () => {
const rootRoute = createRootRoute({
component: () => {
return (
Expand Down Expand Up @@ -575,6 +574,8 @@ test.skip('reproducer #4546', async () => {
fireEvent.click(idLink)

{
// Wait for navigation to complete before checking values
await screen.findByText('$id route')
const headerCounter = await screen.findByTestId('header-counter')
expect(headerCounter).toHaveTextContent('2')

Expand All @@ -588,6 +589,8 @@ test.skip('reproducer #4546', async () => {
fireEvent.click(indexLink)

{
// Wait for navigation to complete before checking values
await screen.findByText('Index route')
const headerCounter = await screen.findByTestId('header-counter')
expect(headerCounter).toHaveTextContent('3')

Expand All @@ -601,6 +604,8 @@ test.skip('reproducer #4546', async () => {
fireEvent.click(invalidateRouterButton)

{
// Wait for router to invalidate and reload
await new Promise((resolve) => setTimeout(resolve, 50))
const headerCounter = await screen.findByTestId('header-counter')
expect(headerCounter).toHaveTextContent('4')

Expand All @@ -614,6 +619,8 @@ test.skip('reproducer #4546', async () => {
fireEvent.click(idLink)

{
// Wait for navigation to complete before checking values
await screen.findByText('$id route')
const headerCounter = await screen.findByTestId('header-counter')
expect(headerCounter).toHaveTextContent('5')

Expand Down
Loading