Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Me 17964 - floating player page video playing #776

Merged
merged 4 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions test/e2e/specs/floatingPlayerPgae.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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';

const link = getLinkByName(ExampleLinkName.FloatingPlayer);

vpTest(`Test if video on floating player page is playing as expected`, async ({ page, pomPages }) => {
await test.step('Navigate to floating player page by clicking on link', async () => {
await pomPages.mainPage.clickLinkByName(link.name);
await waitForPageToLoadWithTimeout(page, 5000);
});
await test.step('Validating that floating player video is playing', async () => {
await pomPages.floatingPlayerPage.floatingPlayerVideoComponent.validateVideoIsPlaying(true);
});
});
5 changes: 5 additions & 0 deletions test/e2e/src/pom/PageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { CodecsAndFormats } from './codecsAndFormats';
import { ColorsApiPage } from './colorsApiPage';
import { ComponentsPage } from './componentsPage';
import { DisplayConfigurationsPage } from './displayConfigurationsPage';
import { FloatingPlayerPage } from './floatingPlayerPgae';

/**
* Page manager,
Expand Down Expand Up @@ -111,5 +112,9 @@ export class PageManager {
public get displayConfigurationsPage(): DisplayConfigurationsPage {
return this.getPage(DisplayConfigurationsPage);
}

public get floatingPlayerPage(): FloatingPlayerPage {
return this.getPage(FloatingPlayerPage);
}
}
export default PageManager;
16 changes: 16 additions & 0 deletions test/e2e/src/pom/floatingPlayerPgae.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Page } from '@playwright/test';
import { VideoComponent } from '../../components/videoComponent';
import { BasePage } from './BasePage';
const FLOATING_PLAYER_PAGE_VIDEO_SELECTOR = '//*[@id="player_html5_api"]';

/**
* Video player examples floating player page object
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Floating player page object'
is better

export class FloatingPlayerPage extends BasePage {
public floatingPlayerVideoComponent: VideoComponent;

constructor(page: Page) {
super(page);
this.floatingPlayerVideoComponent = new VideoComponent(page, FLOATING_PLAYER_PAGE_VIDEO_SELECTOR);
}
}
Loading