1 import { PlayerPage } from '../po/player.po'
2 import { VideoWatchPage } from '../po/video-watch.po'
3 import { FIXTURE_URLS, go, isMobileDevice, isSafari } from '../utils'
5 describe('Live all workflow', () => {
6 let videoWatchPage: VideoWatchPage
7 let playerPage: PlayerPage
9 beforeEach(async () => {
10 videoWatchPage = new VideoWatchPage(isMobileDevice(), isSafari())
11 playerPage = new PlayerPage()
13 if (!isMobileDevice()) {
14 await browser.maximizeWindow()
18 it('Should go to the live page', async () => {
19 await go(FIXTURE_URLS.LIVE_VIDEO)
21 return videoWatchPage.waitWatchVideoName('E2E - Live')
24 it('Should play the live', async () => {
25 await playerPage.playAndPauseVideo(false, 45)
26 expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(45)
29 it('Should watch the associated live embed', async () => {
30 await videoWatchPage.goOnAssociatedEmbed()
32 await playerPage.playAndPauseVideo(false, 45)
33 expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(45)