Skip to content

Commit 04abf41

Browse files
authored
Merge branch 'master' into feat-live-streams-analytics
2 parents 35c194c + 96ac989 commit 04abf41

4 files changed

Lines changed: 38 additions & 18 deletions

File tree

src/index.all.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export * from './plugins/chapters/chapters.js';
1212
export * from './plugins/ima/ima.js';
1313
export * from './plugins/playlist/playlist.js';
1414
export * from './plugins/interaction-areas/interaction-areas.service.js';
15+
export * from './plugins/visual-search/visual-search.js';
1516
export * from './components/shoppable-bar/shoppable-widget.js';
1617

1718
export default cloudinary;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { vpTest } from '../../fixtures/vpTest';
2+
import { ExampleLinkName } from '../../testData/ExampleLinkNames';
3+
import { testVideoTransformationsPageVideoIsPlaying } from '../commonSpecs/videoTransformationsPage';
4+
import { getEsmLinkByName } from '../../testData/esmPageLinksData';
5+
import { ESM_URL } from '../../testData/esmUrl';
6+
7+
const link = getEsmLinkByName(ExampleLinkName.VideoTransformations);
8+
9+
vpTest(`Test if 3 videos on ESM video transformations page are playing as expected`, async ({ page, pomPages }) => {
10+
await page.goto(ESM_URL);
11+
await testVideoTransformationsPageVideoIsPlaying(page, pomPages, link);
12+
});
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
import { vpTest } from '../../fixtures/vpTest';
2-
import { test } from '@playwright/test';
3-
import { waitForPageToLoadWithTimeout } from '../../src/helpers/waitForPageToLoadWithTimeout';
42
import { getLinkByName } from '../../testData/pageLinksData';
53
import { ExampleLinkName } from '../../testData/ExampleLinkNames';
4+
import { testVideoTransformationsPageVideoIsPlaying } from '../commonSpecs/videoTransformationsPage';
65

76
const link = getLinkByName(ExampleLinkName.VideoTransformations);
87

98
vpTest(`Test if 3 videos on video transformations page are playing as expected`, async ({ page, pomPages }) => {
10-
await test.step('Navigate to video transformations page by clicking on link', async () => {
11-
await pomPages.mainPage.clickLinkByName(link.name);
12-
await waitForPageToLoadWithTimeout(page, 5000);
13-
});
14-
await test.step('Validating that via source transformation video is playing', async () => {
15-
await pomPages.videoTransformationsPage.viaSourceVideoComponent.validateVideoIsPlaying(true);
16-
});
17-
await test.step('Validating that via player transformation video is playing', async () => {
18-
await pomPages.videoTransformationsPage.viaPlayerVideoComponent.validateVideoIsPlaying(true);
19-
});
20-
await test.step('Scroll until data cld transformation video element is visible', async () => {
21-
await pomPages.videoTransformationsPage.viaDataCldTransformationsVideoComponent.locator.scrollIntoViewIfNeeded();
22-
});
23-
await test.step('Validating that via data cld transformation video is playing', async () => {
24-
await pomPages.videoTransformationsPage.viaDataCldTransformationsVideoComponent.validateVideoIsPlaying(true);
25-
});
9+
await testVideoTransformationsPageVideoIsPlaying(page, pomPages, link);
2610
});
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Page, test } from '@playwright/test';
2+
import { waitForPageToLoadWithTimeout } from '../../src/helpers/waitForPageToLoadWithTimeout';
3+
import PageManager from '../../src/pom/PageManager';
4+
import { ExampleLinkType } from '../../types/exampleLinkType';
5+
6+
export async function testVideoTransformationsPageVideoIsPlaying(page: Page, pomPages: PageManager, link: ExampleLinkType) {
7+
await test.step('Navigate to video transformations page by clicking on link', async () => {
8+
await pomPages.mainPage.clickLinkByName(link.name);
9+
await waitForPageToLoadWithTimeout(page, 5000);
10+
});
11+
await test.step('Validating that via source transformation video is playing', async () => {
12+
await pomPages.videoTransformationsPage.viaSourceVideoComponent.validateVideoIsPlaying(true);
13+
});
14+
await test.step('Validating that via player transformation video is playing', async () => {
15+
await pomPages.videoTransformationsPage.viaPlayerVideoComponent.validateVideoIsPlaying(true);
16+
});
17+
await test.step('Scroll until data cld transformation video element is visible', async () => {
18+
await pomPages.videoTransformationsPage.viaDataCldTransformationsVideoComponent.locator.scrollIntoViewIfNeeded();
19+
});
20+
await test.step('Validating that via data cld transformation video is playing', async () => {
21+
await pomPages.videoTransformationsPage.viaDataCldTransformationsVideoComponent.validateVideoIsPlaying(true);
22+
});
23+
}

0 commit comments

Comments
 (0)