aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/e2e/protractor.conf.js4
-rw-r--r--client/e2e/src/po/video-watch.po.ts9
-rw-r--r--client/e2e/src/videos.e2e-spec.ts4
3 files changed, 11 insertions, 6 deletions
diff --git a/client/e2e/protractor.conf.js b/client/e2e/protractor.conf.js
index 3fce9b0f5..5682de829 100644
--- a/client/e2e/protractor.conf.js
+++ b/client/e2e/protractor.conf.js
@@ -12,7 +12,9 @@ exports.config = {
12 'browserstack.user': process.env.BROWSERSTACK_USER, 12 'browserstack.user': process.env.BROWSERSTACK_USER,
13 'browserstack.key': process.env.BROWSERSTACK_KEY, 13 'browserstack.key': process.env.BROWSERSTACK_KEY,
14 'browserstack.local': true, 14 'browserstack.local': true,
15 project: 'PeerTube' 15 'browserstack.console': 'info',
16 project: 'PeerTube',
17 name: 'Bstack-[Protractor] Parallel Test'
16 }, 18 },
17 19
18 multiCapabilities: [ 20 multiCapabilities: [
diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts
index a6efae288..4a36fce62 100644
--- a/client/e2e/src/po/video-watch.po.ts
+++ b/client/e2e/src/po/video-watch.po.ts
@@ -14,7 +14,7 @@ export class VideoWatchPage {
14 await browser.get(url) 14 await browser.get(url)
15 15
16 // Waiting the following element does not work on Safari... 16 // Waiting the following element does not work on Safari...
17 if (isSafari === true) return browser.sleep(3000) 17 if (isSafari) return browser.sleep(3000)
18 18
19 const elem = element.all(by.css('.videos .video-miniature .video-miniature-name')).first() 19 const elem = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
20 return browser.wait(browser.ExpectedConditions.visibilityOf(elem)) 20 return browser.wait(browser.ExpectedConditions.visibilityOf(elem))
@@ -84,13 +84,12 @@ export class VideoWatchPage {
84 } 84 }
85 85
86 async clickOnFirstVideo () { 86 async clickOnFirstVideo () {
87 const video = element.all(by.css('.videos .video-miniature .video-thumbnail')).first() 87 const video = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
88 const videoName = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
89 88
90 // Don't know why but the expectation fails on Safari 89 // Don't know why but the expectation fails on Safari
91 await browser.wait(browser.ExpectedConditions.elementToBeClickable(video)) 90 await browser.wait(browser.ExpectedConditions.elementToBeClickable(video))
92 91
93 const textToReturn = videoName.getText() 92 const textToReturn = video.getText()
94 await video.click() 93 await video.click()
95 94
96 await browser.wait(browser.ExpectedConditions.urlContains('/watch/')) 95 await browser.wait(browser.ExpectedConditions.urlContains('/watch/'))
@@ -106,7 +105,7 @@ export class VideoWatchPage {
106 } 105 }
107 106
108 async goOnP2PMediaLoaderEmbed () { 107 async goOnP2PMediaLoaderEmbed () {
109 return browser.get('https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50?mode=p2p-media-loader') 108 return browser.get('https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50')
110 } 109 }
111 110
112 async clickOnUpdate () { 111 async clickOnUpdate () {
diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts
index 075add531..b2c5ab4c6 100644
--- a/client/e2e/src/videos.e2e-spec.ts
+++ b/client/e2e/src/videos.e2e-spec.ts
@@ -53,6 +53,10 @@ describe('Videos workflow', () => {
53 if (await isSafari()) { 53 if (await isSafari()) {
54 console.log('Safari detected.') 54 console.log('Safari detected.')
55 } 55 }
56
57 if (!await isMobileDevice()) {
58 await browser.driver.manage().window().maximize()
59 }
56 }) 60 })
57 61
58 it('Should log in', async () => { 62 it('Should log in', async () => {