mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
test(e2e,playwright): video-player.tsx (#51943)
Co-authored-by: Rohit Rai <rohitraijob@gmail.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(
|
||||
'/learn/scientific-computing-with-python/python-for-everybody/introduction-why-program'
|
||||
);
|
||||
});
|
||||
|
||||
test.describe('Challenge Video Player Component Tests', () => {
|
||||
test('should render video player and play button', async ({ page }) => {
|
||||
await expect(
|
||||
page.locator('iframe[title="YouTube video player"]')
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page
|
||||
.frameLocator('.display-youtube-video')
|
||||
.getByRole('button', { name: 'Play' })
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user