diff --git a/packages/react/test/apps/react-18/app/group-1-unchanged/page.tsx b/packages/react/test/apps/react-18/app/group-1-unchanged/page.tsx new file mode 100644 index 0000000..05994ee --- /dev/null +++ b/packages/react/test/apps/react-18/app/group-1-unchanged/page.tsx @@ -0,0 +1,50 @@ +'use client' + +import * as React from 'react' +import NumberFlow, { NumberFlowElement, NumberFlowGroup } from '@number-flow/react' +import { flushSync } from 'react-dom' + +export default function Page() { + const [value, setValue] = React.useState(42) + const ref1 = React.useRef(null) + const ref2 = React.useRef(null) + return ( + <> +
+ + + + +
+ +
+ + + ) +} diff --git a/packages/react/test/apps/react-19/app/group-1-unchanged/page.tsx b/packages/react/test/apps/react-19/app/group-1-unchanged/page.tsx new file mode 100644 index 0000000..05994ee --- /dev/null +++ b/packages/react/test/apps/react-19/app/group-1-unchanged/page.tsx @@ -0,0 +1,50 @@ +'use client' + +import * as React from 'react' +import NumberFlow, { NumberFlowElement, NumberFlowGroup } from '@number-flow/react' +import { flushSync } from 'react-dom' + +export default function Page() { + const [value, setValue] = React.useState(42) + const ref1 = React.useRef(null) + const ref2 = React.useRef(null) + return ( + <> +
+ + + + +
+ +
+ + + ) +} diff --git a/packages/svelte/src/routes/group-1-unchanged/+page.svelte b/packages/svelte/src/routes/group-1-unchanged/+page.svelte new file mode 100644 index 0000000..e11f065 --- /dev/null +++ b/packages/svelte/src/routes/group-1-unchanged/+page.svelte @@ -0,0 +1,43 @@ + + +
+ + + +
+ +
+ diff --git a/packages/vue/test/apps/nuxt3/src/pages/group-1-unchanged.vue b/packages/vue/test/apps/nuxt3/src/pages/group-1-unchanged.vue new file mode 100644 index 0000000..07a653a --- /dev/null +++ b/packages/vue/test/apps/nuxt3/src/pages/group-1-unchanged.vue @@ -0,0 +1,45 @@ + + diff --git a/test-suites/wrapper/group-1-unchanged.test.ts b/test-suites/wrapper/group-1-unchanged.test.ts new file mode 100644 index 0000000..85f90b6 --- /dev/null +++ b/test-suites/wrapper/group-1-unchanged.test.ts @@ -0,0 +1,15 @@ +import { test, expect } from '@playwright/test' + +test.skip( + ({ javaScriptEnabled, contextOptions }) => + !javaScriptEnabled || contextOptions.reducedMotion === 'reduce' +) + +test('transitions correctly', async ({ page, contextOptions }) => { + // Not sure why this is necessary for Svelte Chromium/Safari but I couldn't get it to work without it: + // https://www.reddit.com/r/sveltejs/comments/15m9jch/how_do_you_wait_for_sveltekit_to_be_completely/ + await page.goto('/group-1-unchanged', { waitUntil: 'networkidle' }) + + await page.getByRole('button', { name: 'Change and pause' }).click() + await expect(page).toHaveScreenshot({ animations: 'allow' }) +}) diff --git a/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-chromium-darwin.png b/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-chromium-darwin.png new file mode 100644 index 0000000..18b0c7a Binary files /dev/null and b/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-chromium-darwin.png differ diff --git a/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-firefox-darwin.png b/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-firefox-darwin.png new file mode 100644 index 0000000..5837e24 Binary files /dev/null and b/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-firefox-darwin.png differ diff --git a/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-webkit-darwin.png b/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-webkit-darwin.png new file mode 100644 index 0000000..b8677f6 Binary files /dev/null and b/test-suites/wrapper/group-1-unchanged.test.ts-snapshots/transitions-correctly-1-webkit-darwin.png differ