Skip to content
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/fluidLayoutsPage.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.FluidLayouts);

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

/**
* Page manager,
Expand Down Expand Up @@ -116,5 +117,9 @@ export class PageManager {
public get floatingPlayerPage(): FloatingPlayerPage {
return this.getPage(FloatingPlayerPage);
}

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

/**
* Video player examples fluid layouts page object
*/
export class FluidLayoutsPage extends BasePage {
public fluidLayoutsVideoComponent: VideoComponent;

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