aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/suites-all
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-24 14:52:54 +0200
committerChocobozzz <me@florianbigard.com>2022-06-24 14:52:54 +0200
commit85f6202a81790f351c0ab3eab3dc34e9b1f58a5b (patch)
treeffcac8fed490c6cc59f93223a4fdd900a8f5a015 /client/e2e/src/suites-all
parent7c07259ae5c7b636d52b8ec103a19d31c2f5b755 (diff)
downloadPeerTube-85f6202a81790f351c0ab3eab3dc34e9b1f58a5b.tar.gz
PeerTube-85f6202a81790f351c0ab3eab3dc34e9b1f58a5b.tar.zst
PeerTube-85f6202a81790f351c0ab3eab3dc34e9b1f58a5b.zip
Add live play tests
Diffstat (limited to 'client/e2e/src/suites-all')
-rw-r--r--client/e2e/src/suites-all/live.e2e-spec.ts35
1 files changed, 35 insertions, 0 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 @@
1import { PlayerPage } from '../po/player.po'
2import { VideoWatchPage } from '../po/video-watch.po'
3import { FIXTURE_URLS, go, isMobileDevice, isSafari } from '../utils'
4
5describe('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})