diff options
Diffstat (limited to 'client/e2e/src/suites-all')
-rw-r--r-- | client/e2e/src/suites-all/private-videos.e2e-spec.ts | 60 | ||||
-rw-r--r-- | client/e2e/src/suites-all/videos.e2e-spec.ts | 6 |
2 files changed, 63 insertions, 3 deletions
diff --git a/client/e2e/src/suites-all/private-videos.e2e-spec.ts b/client/e2e/src/suites-all/private-videos.e2e-spec.ts new file mode 100644 index 000000000..db3554659 --- /dev/null +++ b/client/e2e/src/suites-all/private-videos.e2e-spec.ts | |||
@@ -0,0 +1,60 @@ | |||
1 | import { LoginPage } from '../po/login.po' | ||
2 | import { PlayerPage } from '../po/player.po' | ||
3 | import { VideoWatchPage } from '../po/video-watch.po' | ||
4 | import { FIXTURE_URLS, go, isMobileDevice, isSafari } from '../utils' | ||
5 | |||
6 | async function checkCorrectlyPlay (playerPage: PlayerPage) { | ||
7 | await playerPage.playAndPauseVideo(false, 2) | ||
8 | |||
9 | expect(await playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) | ||
10 | } | ||
11 | |||
12 | describe('Private videos all workflow', () => { | ||
13 | let videoWatchPage: VideoWatchPage | ||
14 | let loginPage: LoginPage | ||
15 | let playerPage: PlayerPage | ||
16 | |||
17 | const internalVideoName = 'Internal E2E test' | ||
18 | |||
19 | beforeEach(async () => { | ||
20 | videoWatchPage = new VideoWatchPage(isMobileDevice(), isSafari()) | ||
21 | loginPage = new LoginPage(isMobileDevice()) | ||
22 | playerPage = new PlayerPage() | ||
23 | |||
24 | if (!isMobileDevice()) { | ||
25 | await browser.maximizeWindow() | ||
26 | } | ||
27 | }) | ||
28 | |||
29 | it('Should log in', async () => { | ||
30 | return loginPage.loginOnPeerTube2() | ||
31 | }) | ||
32 | |||
33 | it('Should play an internal webtorrent video', async () => { | ||
34 | await go(FIXTURE_URLS.INTERNAL_WEBTORRENT_VIDEO) | ||
35 | |||
36 | await videoWatchPage.waitWatchVideoName(internalVideoName) | ||
37 | await checkCorrectlyPlay(playerPage) | ||
38 | }) | ||
39 | |||
40 | it('Should play an internal HLS video', async () => { | ||
41 | await go(FIXTURE_URLS.INTERNAL_HLS_VIDEO) | ||
42 | |||
43 | await videoWatchPage.waitWatchVideoName(internalVideoName) | ||
44 | await checkCorrectlyPlay(playerPage) | ||
45 | }) | ||
46 | |||
47 | it('Should play an internal WebTorrent video in embed', async () => { | ||
48 | await go(FIXTURE_URLS.INTERNAL_EMBED_WEBTORRENT_VIDEO) | ||
49 | |||
50 | await videoWatchPage.waitEmbedForDisplayed() | ||
51 | await checkCorrectlyPlay(playerPage) | ||
52 | }) | ||
53 | |||
54 | it('Should play an internal HLS video in embed', async () => { | ||
55 | await go(FIXTURE_URLS.INTERNAL_EMBED_HLS_VIDEO) | ||
56 | |||
57 | await videoWatchPage.waitEmbedForDisplayed() | ||
58 | await checkCorrectlyPlay(playerPage) | ||
59 | }) | ||
60 | }) | ||
diff --git a/client/e2e/src/suites-all/videos.e2e-spec.ts b/client/e2e/src/suites-all/videos.e2e-spec.ts index b3a87c8e2..997d58884 100644 --- a/client/e2e/src/suites-all/videos.e2e-spec.ts +++ b/client/e2e/src/suites-all/videos.e2e-spec.ts | |||
@@ -49,7 +49,7 @@ describe('Videos all workflow', () => { | |||
49 | videoUploadPage = new VideoUploadPage() | 49 | videoUploadPage = new VideoUploadPage() |
50 | videoUpdatePage = new VideoUpdatePage() | 50 | videoUpdatePage = new VideoUpdatePage() |
51 | myAccountPage = new MyAccountPage() | 51 | myAccountPage = new MyAccountPage() |
52 | loginPage = new LoginPage() | 52 | loginPage = new LoginPage(isMobileDevice()) |
53 | playerPage = new PlayerPage() | 53 | playerPage = new PlayerPage() |
54 | videoListPage = new VideoListPage(isMobileDevice(), isSafari()) | 54 | videoListPage = new VideoListPage(isMobileDevice(), isSafari()) |
55 | 55 | ||
@@ -72,7 +72,7 @@ describe('Videos all workflow', () => { | |||
72 | 72 | ||
73 | await videoUploadPage.navigateTo() | 73 | await videoUploadPage.navigateTo() |
74 | 74 | ||
75 | await videoUploadPage.uploadVideo() | 75 | await videoUploadPage.uploadVideo('video.mp4') |
76 | return videoUploadPage.validSecondUploadStep(videoName) | 76 | return videoUploadPage.validSecondUploadStep(videoName) |
77 | }) | 77 | }) |
78 | 78 | ||
@@ -147,7 +147,7 @@ describe('Videos all workflow', () => { | |||
147 | 147 | ||
148 | await videoUploadPage.navigateTo() | 148 | await videoUploadPage.navigateTo() |
149 | 149 | ||
150 | await videoUploadPage.uploadVideo() | 150 | await videoUploadPage.uploadVideo('video2.mp4') |
151 | await videoUploadPage.validSecondUploadStep(video2Name) | 151 | await videoUploadPage.validSecondUploadStep(video2Name) |
152 | 152 | ||
153 | await videoWatchPage.clickOnSave() | 153 | await videoWatchPage.clickOnSave() |