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-17966: test if video on force HLS subtitles page is playing #778

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all 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/forceHlsSubtitlesPage.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.ForceHLSSubtitles);

vpTest(`Test if video on force HLS subtitles page is playing as expected`, async ({ page, pomPages }) => {
await test.step('Navigate to force HLS subtitles page by clicking on link', async () => {
await pomPages.mainPage.clickLinkByName(link.name);
await waitForPageToLoadWithTimeout(page, 5000);
});
await test.step('Validating that force HLS subtitles video is playing', async () => {
await pomPages.forceHlsSubtitlesPage.forceHlsSubtitlesVideoComponent.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 @@ -14,6 +14,7 @@ import { ComponentsPage } from './componentsPage';
import { DisplayConfigurationsPage } from './displayConfigurationsPage';
import { FloatingPlayerPage } from './floatingPlayerPgae';
import { FluidLayoutsPage } from './fluidLayoutsPage';
import { ForceHlsSubtitlesPage } from './forceHlsSubtitlesPage';

/**
* Page manager,
Expand Down Expand Up @@ -121,5 +122,9 @@ export class PageManager {
public get fluidLayoutsPage(): FluidLayoutsPage {
return this.getPage(FluidLayoutsPage);
}

public get forceHlsSubtitlesPage(): ForceHlsSubtitlesPage {
return this.getPage(ForceHlsSubtitlesPage);
}
}
export default PageManager;
16 changes: 16 additions & 0 deletions test/e2e/src/pom/forceHlsSubtitlesPage.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 FORCE_HLS_SUBTITLES_PAGE_VIDEO_SELECTOR = '//*[@id="player_html5_api"]';

/**
* Video player examples force HLS subtitles page object
*/
export class ForceHlsSubtitlesPage extends BasePage {
public forceHlsSubtitlesVideoComponent: VideoComponent;

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