Skip to content

Commit

Permalink
me-17963: test if video on display configuration page is playing (#773)
Browse files Browse the repository at this point in the history
* vp test: test if video on display configuration page is playing

* vp test: rename configuration to configurations
  • Loading branch information
ShayLevi authored Dec 25, 2024
1 parent 2f2909e commit 8298ac9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/e2e/specs/displayConfigurationsPage.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { vpTest } from '../fixtures/vpTest';
import { expect, test } from '@playwright/test';
import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout';
import { getLinkByName } from '../testData/pageLinksData';
import { ExampleLinkName } from '../testData/ExampleLinkNames';

const link = getLinkByName(ExampleLinkName.DisplayConfigurations);

vpTest(`Test if video on display configurations page is playing as expected`, async ({ page, pomPages }) => {
await test.step('Navigate to display configurations page by clicking on link', async () => {
await pomPages.mainPage.clickLinkByName(link.name);
await waitForPageToLoadWithTimeout(page, 5000);
});
await test.step('Validating that display configuration video is playing (in case isPause is false)', async () => {
expect(await pomPages.displayConfigurationsPage.displayConfigurationsPageVideoComponent.validateVideoPaused(false));
});
});
5 changes: 5 additions & 0 deletions test/e2e/src/pom/PageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { CldAnalyticsPage } from './cldAnalyticsPage';
import { CodecsAndFormats } from './codecsAndFormats';
import { ColorsApiPage } from './colorsApiPage';
import { ComponentsPage } from './componentsPage';
import { DisplayConfigurationsPage } from './displayConfigurationsPage';

/**
* Page manager,
Expand Down Expand Up @@ -106,5 +107,9 @@ export class PageManager {
public get componentsPage(): ComponentsPage {
return this.getPage(ComponentsPage);
}

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

/**
* Video player examples components page object
*/
export class DisplayConfigurationsPage extends BasePage {
public displayConfigurationsPageVideoComponent: VideoComponent;

constructor(page: Page) {
super(page);
this.displayConfigurationsPageVideoComponent = new VideoComponent(page, DISPLAY_CONFIGURATIONS_PAGE_VIDEO_SELECTOR);
}
}

0 comments on commit 8298ac9

Please sign in to comment.