| 1 |
import { test } from '@playwright/test'; |
| 2 |
|
| 3 |
import { expectSwupAnimationDuration } from '../support/swup.js'; |
| 4 |
|
| 5 |
test.describe('animation timing', () => { |
| 6 |
test('detects animation timing', async ({ page }) => { |
| 7 |
await page.goto('/animation-duration.html'); |
| 8 |
await expectSwupAnimationDuration(page, { out: 400, in: 400, total: 800 }); |
| 9 |
}); |
| 10 |
|
| 11 |
test('detects complex animation timing', async ({ page }) => { |
| 12 |
await page.goto('/animation-complex.html'); |
| 13 |
await expectSwupAnimationDuration(page, { out: 600, in: 600, total: 1200 }); |
| 14 |
}); |
| 15 |
|
| 16 |
test('detects keyframe timing', async ({ page }) => { |
| 17 |
await page.goto('/animation-keyframes.html'); |
| 18 |
await expectSwupAnimationDuration(page, { out: 700, in: 700, total: 1400 }); |
| 19 |
}); |
| 20 |
}); |