diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/e2e/src/suites-all/live.e2e-spec.ts | 35 | ||||
-rw-r--r-- | client/e2e/src/utils/urls.ts | 4 |
2 files changed, 38 insertions, 1 deletions
diff --git a/client/e2e/src/suites-all/live.e2e-spec.ts b/client/e2e/src/suites-all/live.e2e-spec.ts new file mode 100644 index 000000000..31ec11913 --- /dev/null +++ b/client/e2e/src/suites-all/live.e2e-spec.ts | |||
@@ -0,0 +1,35 @@ | |||
1 | import { PlayerPage } from '../po/player.po' | ||
2 | import { VideoWatchPage } from '../po/video-watch.po' | ||
3 | import { FIXTURE_URLS, go, isMobileDevice, isSafari } from '../utils' | ||
4 | |||
5 | describe('Live all workflow', () => { | ||
6 | let videoWatchPage: VideoWatchPage | ||
7 | let playerPage: PlayerPage | ||
8 | |||
9 | beforeEach(async () => { | ||
10 | videoWatchPage = new VideoWatchPage(isMobileDevice(), isSafari()) | ||
11 | playerPage = new PlayerPage() | ||
12 | |||
13 | if (!isMobileDevice()) { | ||
14 | await browser.maximizeWindow() | ||
15 | } | ||
16 | }) | ||
17 | |||
18 | it('Should go to the live page', async () => { | ||
19 | await go(FIXTURE_URLS.LIVE_VIDEO) | ||
20 | |||
21 | return videoWatchPage.waitWatchVideoName('E2E - Live') | ||
22 | }) | ||
23 | |||
24 | it('Should play the live', async () => { | ||
25 | await playerPage.playAndPauseVideo(false, 45) | ||
26 | expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(45) | ||
27 | }) | ||
28 | |||
29 | it('Should watch the associated live embed', async () => { | ||
30 | await videoWatchPage.goOnAssociatedEmbed() | ||
31 | |||
32 | await playerPage.playAndPauseVideo(false, 45) | ||
33 | expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(45) | ||
34 | }) | ||
35 | }) | ||
diff --git a/client/e2e/src/utils/urls.ts b/client/e2e/src/utils/urls.ts index 664c65931..e82ff1b2e 100644 --- a/client/e2e/src/utils/urls.ts +++ b/client/e2e/src/utils/urls.ts | |||
@@ -2,7 +2,9 @@ const FIXTURE_URLS = { | |||
2 | WEBTORRENT_VIDEO: 'https://peertube2.cpy.re/w/122d093a-1ede-43bd-bd34-59d2931ffc5e', | 2 | WEBTORRENT_VIDEO: 'https://peertube2.cpy.re/w/122d093a-1ede-43bd-bd34-59d2931ffc5e', |
3 | 3 | ||
4 | HLS_EMBED: 'https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50', | 4 | HLS_EMBED: 'https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50', |
5 | HLS_PLAYLIST_EMBED: 'https://peertube2.cpy.re/video-playlists/embed/73804a40-da9a-40c2-b1eb-2c6d9eec8f0a' | 5 | HLS_PLAYLIST_EMBED: 'https://peertube2.cpy.re/video-playlists/embed/73804a40-da9a-40c2-b1eb-2c6d9eec8f0a', |
6 | |||
7 | LIVE_VIDEO: 'https://peertube2.cpy.re/w/oBw6LwsMWWRkmXYfuYRpJd' | ||
6 | } | 8 | } |
7 | 9 | ||
8 | export { | 10 | export { |