Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screenshots for the duckplayer overlay #1030

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion integration-test/playwright/duckplayer-mobile.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test } from '@playwright/test'
import { expect, test } from '@playwright/test'
import { DuckplayerOverlays } from './page-objects/duckplayer-overlays.js'

test.describe('Video Player overlays', () => {
Expand Down Expand Up @@ -107,3 +107,17 @@ test.describe.skip('Translated Overlays', () => {
})
}
})

/**
* Use `npm run playwright-screenshots` to run this test only.
*/
test.describe('Overlay screenshot @screenshots', () => {
test('testing Overlay UI \'en\'', async ({ page }, workerInfo) => {
const overlays = DuckplayerOverlays.create(page, workerInfo)
await overlays.withRemoteConfig({ locale: 'en' })
await overlays.userSettingIs('always ask')
await overlays.gotoPlayerPage()
await page.locator('ddg-video-overlay-mobile').nth(0).waitFor()
await expect(page.locator('.html5-video-player')).toHaveScreenshot('overlay.png', { maxDiffPixels: 20 })
})
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"posttest-int-x": "npm run test-int-x --workspaces --if-present",
"serve": "http-server -c-1 --port 3220 integration-test/test-pages",
"serve-special-pages": "http-server -c-1 --port 3221 build/integration/pages",
"playwright": "playwright test",
"playwright": "playwright test --grep-invert '@screenshots'",
shakyShane marked this conversation as resolved.
Show resolved Hide resolved
"playwright-screenshots": "playwright test --grep '@screenshots'",
"playwright-headed": "playwright test --headed",
"preplaywright": "npm run build-windows && npm run build-apple && npm run build-android",
"preplaywright-headed": "npm run build-windows && npm run build-apple && npm run build-android",
Expand Down
Loading