Skip to content

Commit

Permalink
test: edit test for youtube modal in 'report a bug' (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
YaelChen authored Jan 23, 2025
1 parent a494bef commit 08a8e66
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/bugReport.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { test } from '@playwright/test'
import { test, expect } from '@playwright/test'

test('An instruction video for Report a bug', async ({ page }) => {
test('the YouTube modal in "report a bug" is visible and have the correct src', async ({
page,
}) => {
await page.goto('/')
await page.getByLabel('bug').locator('svg').click()
await page.getByLabel('לפתוח סרטון על העמוד הזה').locator('svg').click()
const iframeElement = await page.waitForSelector('iframe')
expect(iframeElement.isVisible())
const videoSrc = page.locator('iframe')
await expect(videoSrc).toHaveAttribute(
'src',
'https://www.youtube-nocookie.com/embed?v=F6sD9Bz4Xj0&list=PL6Rh06rT7uiX1AQE-lm55hy-seL3idx3T&index=11',
)
await page.locator('iframe').contentFrame().getByLabel('Play', { exact: true }).click()
await page.locator('iframe').contentFrame().getByLabel('Pause keyboard shortcut k').click()
await page.getByLabel('Close', { exact: true }).click()
Expand Down

0 comments on commit 08a8e66

Please sign in to comment.