From bbdb6170bd499b9aa62d4fb275a805ee17a76b2e Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Tue, 4 Nov 2025 16:00:48 +0100 Subject: [PATCH 1/4] test(solid-router): enhance transition test suite --- .../basic-file-based/tests/transition.spec.ts | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/e2e/solid-router/basic-file-based/tests/transition.spec.ts b/e2e/solid-router/basic-file-based/tests/transition.spec.ts index f5806785a78..82b430284c0 100644 --- a/e2e/solid-router/basic-file-based/tests/transition.spec.ts +++ b/e2e/solid-router/basic-file-based/tests/transition.spec.ts @@ -18,8 +18,17 @@ test('transitions should keep old values visible during navigation', async ({ if (text) bodyTexts.push(text) }, 50) + // 1 click + await page.getByTestId('increase-button').click() + await expect(page.getByTestId('n-value')).toContainText('n: 1', { + timeout: 2_000, + }) + await expect(page.getByTestId('double-value')).toContainText('double: 2', { + timeout: 2_000, + }) + await page.waitForTimeout(200) clearInterval(pollInterval) @@ -31,6 +40,54 @@ test('transitions should keep old values visible during navigation', async ({ timeout: 2000, }) + // 2 clicks + + await page.getByTestId('increase-button').click() + await page.getByTestId('increase-button').click() + + + await expect(page.getByTestId('n-value')).toContainText('n: 2', { + timeout: 2000, + }) + await expect(page.getByTestId('double-value')).toContainText('double: 4', { + timeout: 2000, + }) + + await page.waitForTimeout(200) + + clearInterval(pollInterval) + + await expect(page.getByTestId('n-value')).toContainText('n: 4', { + timeout: 2000, + }) + await expect(page.getByTestId('double-value')).toContainText('double: 8', { + timeout: 2000, + }) + + // 3 clicks + + await page.getByTestId('increase-button').click() + await page.getByTestId('increase-button').click() + await page.getByTestId('increase-button').click() + + await expect(page.getByTestId('n-value')).toContainText('n: 4', { + timeout: 2000, + }) + await expect(page.getByTestId('double-value')).toContainText('double: 8', { + timeout: 2000, + }) + + await page.waitForTimeout(200) + + clearInterval(pollInterval) + + await expect(page.getByTestId('n-value')).toContainText('n: 7', { + timeout: 2000, + }) + await expect(page.getByTestId('double-value')).toContainText('double: 14', { + timeout: 2000, + }) + // With proper transitions, old values should remain visible until new ones arrive const hasLoadingText = bodyTexts.some((text) => text.includes('Loading...')) From f6da91d5fb6ae2177cb6bb1f7170cc871ae648c4 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 15:02:03 +0000 Subject: [PATCH 2/4] ci: apply automated fixes --- e2e/solid-router/basic-file-based/tests/transition.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/e2e/solid-router/basic-file-based/tests/transition.spec.ts b/e2e/solid-router/basic-file-based/tests/transition.spec.ts index 82b430284c0..3bb5df5551f 100644 --- a/e2e/solid-router/basic-file-based/tests/transition.spec.ts +++ b/e2e/solid-router/basic-file-based/tests/transition.spec.ts @@ -45,7 +45,6 @@ test('transitions should keep old values visible during navigation', async ({ await page.getByTestId('increase-button').click() await page.getByTestId('increase-button').click() - await expect(page.getByTestId('n-value')).toContainText('n: 2', { timeout: 2000, }) From 3461780c47eed24b82ae0ee5b40bed018d3926c9 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Tue, 4 Nov 2025 16:08:03 +0100 Subject: [PATCH 3/4] don't clear interval repeatedly --- .../basic-file-based/tests/transition.spec.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/e2e/solid-router/basic-file-based/tests/transition.spec.ts b/e2e/solid-router/basic-file-based/tests/transition.spec.ts index 3bb5df5551f..afcc0bc6e78 100644 --- a/e2e/solid-router/basic-file-based/tests/transition.spec.ts +++ b/e2e/solid-router/basic-file-based/tests/transition.spec.ts @@ -31,8 +31,6 @@ test('transitions should keep old values visible during navigation', async ({ await page.waitForTimeout(200) - clearInterval(pollInterval) - await expect(page.getByTestId('n-value')).toContainText('n: 2', { timeout: 2000, }) @@ -54,8 +52,6 @@ test('transitions should keep old values visible during navigation', async ({ await page.waitForTimeout(200) - clearInterval(pollInterval) - await expect(page.getByTestId('n-value')).toContainText('n: 4', { timeout: 2000, }) @@ -78,8 +74,6 @@ test('transitions should keep old values visible during navigation', async ({ await page.waitForTimeout(200) - clearInterval(pollInterval) - await expect(page.getByTestId('n-value')).toContainText('n: 7', { timeout: 2000, }) @@ -87,6 +81,8 @@ test('transitions should keep old values visible during navigation', async ({ timeout: 2000, }) + clearInterval(pollInterval) + // With proper transitions, old values should remain visible until new ones arrive const hasLoadingText = bodyTexts.some((text) => text.includes('Loading...')) From ae98aded743a9e55f3c7c3d48839035745d5829e Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 15:09:39 +0000 Subject: [PATCH 4/4] ci: apply automated fixes --- e2e/solid-router/basic-file-based/tests/transition.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/solid-router/basic-file-based/tests/transition.spec.ts b/e2e/solid-router/basic-file-based/tests/transition.spec.ts index afcc0bc6e78..87c03d32569 100644 --- a/e2e/solid-router/basic-file-based/tests/transition.spec.ts +++ b/e2e/solid-router/basic-file-based/tests/transition.spec.ts @@ -82,7 +82,7 @@ test('transitions should keep old values visible during navigation', async ({ }) clearInterval(pollInterval) - + // With proper transitions, old values should remain visible until new ones arrive const hasLoadingText = bodyTexts.some((text) => text.includes('Loading...'))