-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathanalyticsPage.spec.ts
More file actions
20 lines (19 loc) · 974 Bytes
/
analyticsPage.spec.ts
File metadata and controls
20 lines (19 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { vpTest } from '../../fixtures/vpTest';
import { test } from '@playwright/test';
import { waitForPageToLoadWithTimeout } from '../../src/helpers/waitForPageToLoadWithTimeout';
import { getLinkByName } from '../../testData/pageLinksData';
import { ExampleLinkName } from '../../testData/ExampleLinkNames';
// Link to Analytics page
const link = getLinkByName(ExampleLinkName.Analytics);
/**
* Testing if video on analytics page is playing by checking that is pause return false.
*/
vpTest(`Test if video on analytics page is playing as expected`, async ({ page, pomPages }) => {
await test.step('Navigate to analytics page by clicking on link', async () => {
await pomPages.mainPage.clickLinkByName(link.name);
await waitForPageToLoadWithTimeout(page, 5000);
});
await test.step('Validating that the video is playing', async () => {
await pomPages.analyticsPage.analyticsVideoComponent.validateVideoIsPlaying(true);
});
});