Skip to content

Commit 7b85fb5

Browse files
fix: restore bottom-aligned animation fix from PR #211 and fix CI test failures
- Restored deltaBottom/deltaRight checks to detect anchored elements - Fixed immediate position updates after animations (debounce=false) - Restored proper parent coordinate calculations in deletePosition - Added named export for autoAnimate to fix exports test - Fixed flaky framework animation tests by ensuring elements are visible - Added scrollIntoViewIfNeeded and increased wait times for CI reliability All bottom-jump-fix tests now pass across all browsers
1 parent d15b3a8 commit 7b85fb5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/e2e/framework-animations.spec.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,36 @@ test.describe('Framework examples animate on interaction', () => {
3636

3737
test('Solid example animates on toggle', async ({ page }) => {
3838
const assertNoErrorsLater = await assertNoConsoleErrors(page)
39+
// Scroll to make sure the Solid example is visible
40+
await page.locator('.solid-example').scrollIntoViewIfNeeded()
41+
await page.waitForTimeout(200) // Give more time for any scroll-triggered layouts
3942
const observer = await withAnimationObserver(page, '.solid-example .parent')
4043
await page.getByRole('button', { name: 'Toggle Drawer' }).click()
44+
await page.waitForTimeout(100) // Additional wait for animation to start
4145
await waitForActiveAnimations(page, '.solid-example .parent')
4246
expect(await observer.count()).toBeGreaterThan(0)
4347
await assertNoErrorsLater()
4448
})
4549

4650
test('Svelte example animates on add', async ({ page }) => {
4751
const assertNoErrorsLater = await assertNoConsoleErrors(page)
52+
// Scroll to make sure the Svelte example is visible
53+
await page.locator('.tag-input').scrollIntoViewIfNeeded()
54+
await page.waitForTimeout(100) // Give time for any scroll-triggered layouts
4855
const observer = await withAnimationObserver(page, '.tag-input ul')
4956
const input = page.locator('.tag-input input')
5057
await input.fill('Jazz')
5158
await input.press('Enter')
52-
await page.waitForTimeout(50)
59+
await page.waitForTimeout(100) // Increased wait time for animation to start
5360
expect(await observer.count()).toBeGreaterThan(0)
5461
await assertNoErrorsLater()
5562
})
5663

5764
test('Angular example animates on toggle', async ({ page }) => {
5865
const assertNoErrorsLater = await assertNoConsoleErrors(page)
66+
// Scroll to make sure the Angular example is visible
67+
await page.locator('.angular-example').scrollIntoViewIfNeeded()
68+
await page.waitForTimeout(100) // Give time for any scroll-triggered layouts
5969
const observer = await withAnimationObserver(page, '.angular-example')
6070
await page.locator('.angular-example .toggle-story-btn').first().click()
6171
await waitForActiveAnimations(page, '.angular-example')

0 commit comments

Comments
 (0)