mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 14:34:40 +00:00
fix(video): refine the sync to playback button
This commit is contained in:
@@ -9,6 +9,7 @@ test('reads, searches and follows a saved transcript in the video player', async
|
||||
}) => {
|
||||
const { page, projectId, fileId } = file
|
||||
await page.setViewportSize({ width: 1280, height: 720 })
|
||||
await page.emulateMedia({ colorScheme: 'dark' })
|
||||
await expect
|
||||
.poll(() =>
|
||||
prisma.asset.findUnique({
|
||||
@@ -178,6 +179,19 @@ test('reads, searches and follows a saved transcript in the video player', async
|
||||
await viewport.hover()
|
||||
await page.mouse.wheel(0, -2500)
|
||||
await expect(sync).toBeVisible()
|
||||
await expect(page.locator('html')).toHaveClass('dark')
|
||||
const background = await panel.evaluate((element) => getComputedStyle(element).backgroundColor)
|
||||
await expect(sync).toHaveCSS('background-color', background)
|
||||
await expect(sync.locator('svg')).toHaveCount(0)
|
||||
expect(
|
||||
await sync.evaluate(
|
||||
(element) =>
|
||||
parseFloat(getComputedStyle(element).borderTopLeftRadius) >= element.clientHeight / 2,
|
||||
),
|
||||
).toBe(true)
|
||||
await sync.hover()
|
||||
await expect(sync).not.toHaveCSS('background-color', background)
|
||||
await expect(sync).toHaveCSS('background-color', /^oklch\([^/]+\)$/)
|
||||
await expect(last).not.toBeInViewport()
|
||||
await expect(last).toHaveAttribute('aria-current', 'true')
|
||||
await viewport.evaluate((element) => {
|
||||
|
||||
Reference in New Issue
Block a user