diff options
Diffstat (limited to 'client/e2e/src')
-rw-r--r-- | client/e2e/src/po/video-watch.po.ts | 11 | ||||
-rw-r--r-- | client/e2e/src/videos.e2e-spec.ts | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts index c06b131b6..c5e37e6de 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)) |
@@ -73,7 +73,10 @@ export class VideoWatchPage { | |||
73 | } | 73 | } |
74 | 74 | ||
75 | async clickOnVideo (videoName: string) { | 75 | async clickOnVideo (videoName: string) { |
76 | const video = element(by.css('.videos .video-miniature .video-thumbnail[title="' + videoName + '"]')) | 76 | const video = element.all(by.css('.videos .video-miniature .video-miniature-name')) |
77 | .filter(e => e.getText().then(t => t === videoName )) | ||
78 | .first() | ||
79 | |||
77 | await browser.wait(browser.ExpectedConditions.elementToBeClickable(video)) | 80 | await browser.wait(browser.ExpectedConditions.elementToBeClickable(video)) |
78 | await video.click() | 81 | await video.click() |
79 | 82 | ||
@@ -103,7 +106,7 @@ export class VideoWatchPage { | |||
103 | } | 106 | } |
104 | 107 | ||
105 | async goOnP2PMediaLoaderEmbed () { | 108 | async goOnP2PMediaLoaderEmbed () { |
106 | return browser.get('https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50?mode=p2p-media-loader') | 109 | return browser.get('https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50') |
107 | } | 110 | } |
108 | 111 | ||
109 | async clickOnUpdate () { | 112 | async clickOnUpdate () { |
@@ -148,7 +151,7 @@ export class VideoWatchPage { | |||
148 | 151 | ||
149 | private getVideoNameElement () { | 152 | private getVideoNameElement () { |
150 | // We have 2 video info name block, pick the first that is not empty | 153 | // We have 2 video info name block, pick the first that is not empty |
151 | return element.all(by.css('.video-bottom .video-info-name')) | 154 | return element.all(by.css('.video-info-first-row .video-info-name')) |
152 | .filter(e => e.getText().then(t => !!t)) | 155 | .filter(e => e.getText().then(t => !!t)) |
153 | .first() | 156 | .first() |
154 | } | 157 | } |
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 () => { |