test(e2e,playwright): video-player.tsx (#51943)

Co-authored-by: Rohit Rai <rohitraijob@gmail.com>
This commit is contained in:
Rohit Rai
2023-10-18 21:20:49 +05:30
committed by GitHub
parent ec51cbbd9f
commit 1ae4559002
+20
View File
@@ -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();
});
});