aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/videos.e2e-spec.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-09-02 08:57:59 +0200
committerChocobozzz <me@florianbigard.com>2021-09-02 09:07:42 +0200
commit12d6b873cd4c5eb8c4fd298885e0c7fa6deb3756 (patch)
tree1abc21b305242e1d5bacefc99c2352b34396a5ab /client/e2e/src/videos.e2e-spec.ts
parent6527eb0ccf823b5eac547c90066d3bd693094b2c (diff)
downloadPeerTube-12d6b873cd4c5eb8c4fd298885e0c7fa6deb3756.tar.gz
PeerTube-12d6b873cd4c5eb8c4fd298885e0c7fa6deb3756.tar.zst
PeerTube-12d6b873cd4c5eb8c4fd298885e0c7fa6deb3756.zip
Improve e2e workflow and add doc
Diffstat (limited to 'client/e2e/src/videos.e2e-spec.ts')
-rw-r--r--client/e2e/src/videos.e2e-spec.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts
index 7f7c814e1..e09e8c675 100644
--- a/client/e2e/src/videos.e2e-spec.ts
+++ b/client/e2e/src/videos.e2e-spec.ts
@@ -4,6 +4,7 @@ import { PlayerPage } from './po/player.po'
4import { VideoUpdatePage } from './po/video-update.po' 4import { VideoUpdatePage } from './po/video-update.po'
5import { VideoUploadPage } from './po/video-upload.po' 5import { VideoUploadPage } from './po/video-upload.po'
6import { VideoWatchPage } from './po/video-watch.po' 6import { VideoWatchPage } from './po/video-watch.po'
7import { FIXTURE_URLS } from './urls'
7import { browserSleep, go, isIOS, isMobileDevice, isSafari } from './utils' 8import { browserSleep, go, isIOS, isMobileDevice, isSafari } from './utils'
8 9
9function isUploadUnsupported () { 10function isUploadUnsupported () {
@@ -91,7 +92,7 @@ describe('Videos workflow', () => {
91 let videoNameToExcept = videoName 92 let videoNameToExcept = videoName
92 93
93 if (isMobileDevice() || isSafari()) { 94 if (isMobileDevice() || isSafari()) {
94 await go('https://peertube2.cpy.re/w/122d093a-1ede-43bd-bd34-59d2931ffc5e') 95 await go(FIXTURE_URLS.WEBTORRENT_VIDEO)
95 videoNameToExcept = 'E2E tests' 96 videoNameToExcept = 'E2E tests'
96 } else { 97 } else {
97 await videoWatchPage.clickOnVideo(videoName) 98 await videoWatchPage.clickOnVideo(videoName)
@@ -103,21 +104,21 @@ describe('Videos workflow', () => {
103 it('Should play the video', async () => { 104 it('Should play the video', async () => {
104 videoWatchUrl = await browser.getUrl() 105 videoWatchUrl = await browser.getUrl()
105 106
106 await playerPage.playAndPauseVideo(true) 107 await playerPage.playAndPauseVideo(true, 2)
107 expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) 108 expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
108 }) 109 })
109 110
110 it('Should watch the associated embed video', async () => { 111 it('Should watch the associated embed video', async () => {
111 await videoWatchPage.goOnAssociatedEmbed() 112 await videoWatchPage.goOnAssociatedEmbed()
112 113
113 await playerPage.playAndPauseVideo(false) 114 await playerPage.playAndPauseVideo(false, 2)
114 expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) 115 expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
115 }) 116 })
116 117
117 it('Should watch the p2p media loader embed video', async () => { 118 it('Should watch the p2p media loader embed video', async () => {
118 await videoWatchPage.goOnP2PMediaLoaderEmbed() 119 await videoWatchPage.goOnP2PMediaLoaderEmbed()
119 120
120 await playerPage.playAndPauseVideo(false) 121 await playerPage.playAndPauseVideo(false, 2)
121 expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) 122 expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
122 }) 123 })
123 124