aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/po/video-watch.po.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-11 09:41:39 +0200
committerChocobozzz <me@florianbigard.com>2020-05-11 09:41:39 +0200
commit60c8b8a5d7bb1aeca18e2d45f5eeccdd66f2276a (patch)
treefaed52ccfb737634c549392b00e146653b63c4ef /client/e2e/src/po/video-watch.po.ts
parent81c647ff191677e3b77814545d12e590c7ebfb1d (diff)
downloadPeerTube-60c8b8a5d7bb1aeca18e2d45f5eeccdd66f2276a.tar.gz
PeerTube-60c8b8a5d7bb1aeca18e2d45f5eeccdd66f2276a.tar.zst
PeerTube-60c8b8a5d7bb1aeca18e2d45f5eeccdd66f2276a.zip
Improve E2E tests
Diffstat (limited to 'client/e2e/src/po/video-watch.po.ts')
-rw-r--r--client/e2e/src/po/video-watch.po.ts9
1 files changed, 4 insertions, 5 deletions
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 () {