aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/videos.e2e-spec.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-21 11:24:07 +0100
committerChocobozzz <me@florianbigard.com>2019-02-21 14:04:44 +0100
commit84c7cde6e81426a42e7aa29187b473bc89f1c8f6 (patch)
tree5c85056f29bc563a6ea29ced4736d4d5cd9851fd /client/e2e/src/videos.e2e-spec.ts
parent1e17071bacc8a78c9145ba602113b1b52dd8fe7b (diff)
downloadPeerTube-84c7cde6e81426a42e7aa29187b473bc89f1c8f6.tar.gz
PeerTube-84c7cde6e81426a42e7aa29187b473bc89f1c8f6.tar.zst
PeerTube-84c7cde6e81426a42e7aa29187b473bc89f1c8f6.zip
Update E2E tests
Diffstat (limited to 'client/e2e/src/videos.e2e-spec.ts')
-rw-r--r--client/e2e/src/videos.e2e-spec.ts29
1 files changed, 25 insertions, 4 deletions
diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts
index 606b6ac5d..7f8ba71b1 100644
--- a/client/e2e/src/videos.e2e-spec.ts
+++ b/client/e2e/src/videos.e2e-spec.ts
@@ -12,8 +12,6 @@ describe('Videos workflow', () => {
12 let isSafari = false 12 let isSafari = false
13 13
14 beforeEach(async () => { 14 beforeEach(async () => {
15 await browser.waitForAngularEnabled(false)
16
17 videoWatchPage = new VideoWatchPage() 15 videoWatchPage = new VideoWatchPage()
18 pageUploadPage = new VideoUploadPage() 16 pageUploadPage = new VideoUploadPage()
19 loginPage = new LoginPage() 17 loginPage = new LoginPage()
@@ -21,6 +19,14 @@ describe('Videos workflow', () => {
21 const caps = await browser.getCapabilities() 19 const caps = await browser.getCapabilities()
22 isMobileDevice = caps.get('realMobile') === 'true' || caps.get('realMobile') === true 20 isMobileDevice = caps.get('realMobile') === 'true' || caps.get('realMobile') === true
23 isSafari = caps.get('browserName') && caps.get('browserName').toLowerCase() === 'safari' 21 isSafari = caps.get('browserName') && caps.get('browserName').toLowerCase() === 'safari'
22
23 if (isMobileDevice) {
24 console.log('Mobile device detected.')
25 }
26
27 if (isSafari) {
28 console.log('Safari detected.')
29 }
24 }) 30 })
25 31
26 it('Should log in', () => { 32 it('Should log in', () => {
@@ -66,14 +72,29 @@ describe('Videos workflow', () => {
66 }) 72 })
67 73
68 it('Should play the video', async () => { 74 it('Should play the video', async () => {
69 await videoWatchPage.pauseVideo(!isMobileDevice, isMobileDevice) 75 await videoWatchPage.playAndPauseVideo(true, isMobileDevice)
70 expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) 76 expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
71 }) 77 })
72 78
73 it('Should watch the associated embed video', async () => { 79 it('Should watch the associated embed video', async () => {
80 await browser.waitForAngularEnabled(false)
81
74 await videoWatchPage.goOnAssociatedEmbed() 82 await videoWatchPage.goOnAssociatedEmbed()
75 83
76 await videoWatchPage.pauseVideo(false, isMobileDevice) 84 await videoWatchPage.playAndPauseVideo(false, isMobileDevice)
77 expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) 85 expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
86
87 await browser.waitForAngularEnabled(true)
88 })
89
90 it('Should watch the p2p media loader embed video', async () => {
91 await browser.waitForAngularEnabled(false)
92
93 await videoWatchPage.goOnP2PMediaLoaderEmbed()
94
95 await videoWatchPage.playAndPauseVideo(false, isMobileDevice)
96 expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
97
98 await browser.waitForAngularEnabled(true)
78 }) 99 })
79}) 100})