Skip to content

Commit ea8c5ae

Browse files
authored
Me 17964 - floating player page video playing (#776)
* vp test: test if video on floating player page is playing * vp test: test if video on floating player page is playing * vp test: test if video on floating player page is playing * vp test: test if video on floating player page is playing
1 parent ea53730 commit ea8c5ae

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { vpTest } from '../fixtures/vpTest';
2+
import { test } from '@playwright/test';
3+
import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout';
4+
import { getLinkByName } from '../testData/pageLinksData';
5+
import { ExampleLinkName } from '../testData/ExampleLinkNames';
6+
7+
const link = getLinkByName(ExampleLinkName.FloatingPlayer);
8+
9+
vpTest(`Test if video on floating player page is playing as expected`, async ({ page, pomPages }) => {
10+
await test.step('Navigate to floating player 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 floating player video is playing', async () => {
15+
await pomPages.floatingPlayerPage.floatingPlayerVideoComponent.validateVideoIsPlaying(true);
16+
});
17+
});

test/e2e/src/pom/PageManager.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { CodecsAndFormats } from './codecsAndFormats';
1212
import { ColorsApiPage } from './colorsApiPage';
1313
import { ComponentsPage } from './componentsPage';
1414
import { DisplayConfigurationsPage } from './displayConfigurationsPage';
15+
import { FloatingPlayerPage } from './floatingPlayerPgae';
1516

1617
/**
1718
* Page manager,
@@ -111,5 +112,9 @@ export class PageManager {
111112
public get displayConfigurationsPage(): DisplayConfigurationsPage {
112113
return this.getPage(DisplayConfigurationsPage);
113114
}
115+
116+
public get floatingPlayerPage(): FloatingPlayerPage {
117+
return this.getPage(FloatingPlayerPage);
118+
}
114119
}
115120
export default PageManager;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Page } from '@playwright/test';
2+
import { VideoComponent } from '../../components/videoComponent';
3+
import { BasePage } from './BasePage';
4+
const FLOATING_PLAYER_PAGE_VIDEO_SELECTOR = '//*[@id="player_html5_api"]';
5+
6+
/**
7+
* Video player examples Floating player page object
8+
*/
9+
export class FloatingPlayerPage extends BasePage {
10+
public floatingPlayerVideoComponent: VideoComponent;
11+
12+
constructor(page: Page) {
13+
super(page);
14+
this.floatingPlayerVideoComponent = new VideoComponent(page, FLOATING_PLAYER_PAGE_VIDEO_SELECTOR);
15+
}
16+
}

0 commit comments

Comments
 (0)