File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 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 . RawURL ) ;
8+
9+ vpTest ( `Test if 2 videos on raw URL page are playing as expected` , async ( { page, pomPages } ) => {
10+ await test . step ( 'Navigate to raw URL 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 raw url video is playing' , async ( ) => {
15+ await pomPages . rawUrlPage . rawUrlVideoComponent . validateVideoIsPlaying ( true ) ;
16+ } ) ;
17+ await test . step ( 'Validating that raw url adaptive video is playing' , async ( ) => {
18+ await pomPages . rawUrlPage . rawUrlAdaptiveVideoComponent . validateVideoIsPlaying ( true ) ;
19+ } ) ;
20+ } ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import { PlaylistPage } from './playlistPage';
2020import { PlaylistByTagPage } from './playlistByTagPage' ;
2121import { PosterOptionsPage } from './posterOptionsPage' ;
2222import { ProfilesPage } from './profilesPage' ;
23+ import { RawUrlPage } from './rawUrlPage' ;
2324
2425/**
2526 * Page manager,
@@ -151,5 +152,9 @@ export class PageManager {
151152 public get profilesPage ( ) : ProfilesPage {
152153 return this . getPage ( ProfilesPage ) ;
153154 }
155+
156+ public get rawUrlPage ( ) : RawUrlPage {
157+ return this . getPage ( RawUrlPage ) ;
158+ }
154159}
155160export default PageManager ;
Original file line number Diff line number Diff line change 1+ import { Page } from '@playwright/test' ;
2+ import { VideoComponent } from '../../components/videoComponent' ;
3+ import { BasePage } from './BasePage' ;
4+ const RAW_URL_PAGE_VIDEO_SELECTOR = '//*[@id="player_html5_api"]' ;
5+ const RAW_URL_PAGE_ADAPTIVE_VIDEO_SELECTOR = '//*[@id="adpPlayer_html5_api"]' ;
6+
7+ /**
8+ * Video player examples raw URL page object
9+ */
10+ export class RawUrlPage extends BasePage {
11+ public rawUrlVideoComponent : VideoComponent ;
12+ public rawUrlAdaptiveVideoComponent : VideoComponent ;
13+
14+ constructor ( page : Page ) {
15+ super ( page ) ;
16+ this . rawUrlVideoComponent = new VideoComponent ( page , RAW_URL_PAGE_VIDEO_SELECTOR ) ;
17+ this . rawUrlAdaptiveVideoComponent = new VideoComponent ( page , RAW_URL_PAGE_ADAPTIVE_VIDEO_SELECTOR ) ;
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments