fix(playwright): video-modal test (#54085)

This commit is contained in:
Tomas
2024-03-21 09:18:47 +01:00
committed by GitHub
parent c50639b59b
commit d907c519a7
+7
View File
@@ -14,6 +14,8 @@ test.describe('Exit Video Modal E2E Test Suite', () => {
test('Verifies the Correct Rendering of the Video Modal', async ({
page
}) => {
const dialogs = page.getByRole('dialog');
await expect(dialogs).toHaveCount(2);
await expect(page.getByTestId('video-modal-title')).toBeVisible();
await expect(
page.getByTestId('video-modal-video-player-iframe')
@@ -29,9 +31,14 @@ test.describe('Exit Video Modal E2E Test Suite', () => {
test('Closes the Video Modal When the User clicks on exit button', async ({
page
}) => {
const dialogs = page.getByRole('dialog');
await expect(dialogs).toHaveCount(2);
await page
.getByRole('button', { name: translations.buttons.close })
.click();
for (const dialog of await dialogs.all()) {
await expect(dialog).not.toBeVisible();
}
await expect(
page.getByText(translations.buttons['watch-video'])
).not.toBeVisible();