diff options
Diffstat (limited to 'client/e2e')
-rw-r--r-- | client/e2e/src/po/video-watch.po.ts | 7 | ||||
-rw-r--r-- | client/e2e/src/videos.e2e-spec.ts | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts index 13f4ae945..e17aebc29 100644 --- a/client/e2e/src/po/video-watch.po.ts +++ b/client/e2e/src/po/video-watch.po.ts | |||
@@ -26,8 +26,11 @@ export class VideoWatchPage { | |||
26 | .then((texts: any) => texts.map(t => t.trim())) | 26 | .then((texts: any) => texts.map(t => t.trim())) |
27 | } | 27 | } |
28 | 28 | ||
29 | waitWatchVideoName (videoName: string, isSafari: boolean) { | 29 | waitWatchVideoName (videoName: string, isMobileDevice: boolean, isSafari: boolean) { |
30 | const elem = element(by.css('.video-info .video-info-name')) | 30 | // On mobile we display the first node, on desktop the second |
31 | const index = isMobileDevice ? 0 : 1 | ||
32 | |||
33 | const elem = element.all(by.css('.video-info .video-info-name')).get(index) | ||
31 | 34 | ||
32 | if (isSafari) return browser.sleep(5000) | 35 | if (isSafari) return browser.sleep(5000) |
33 | 36 | ||
diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts index 3d4d46292..606b6ac5d 100644 --- a/client/e2e/src/videos.e2e-spec.ts +++ b/client/e2e/src/videos.e2e-spec.ts | |||
@@ -12,7 +12,7 @@ describe('Videos workflow', () => { | |||
12 | let isSafari = false | 12 | let isSafari = false |
13 | 13 | ||
14 | beforeEach(async () => { | 14 | beforeEach(async () => { |
15 | browser.waitForAngularEnabled(false) | 15 | await browser.waitForAngularEnabled(false) |
16 | 16 | ||
17 | videoWatchPage = new VideoWatchPage() | 17 | videoWatchPage = new VideoWatchPage() |
18 | pageUploadPage = new VideoUploadPage() | 18 | pageUploadPage = new VideoUploadPage() |
@@ -62,7 +62,7 @@ describe('Videos workflow', () => { | |||
62 | if (isMobileDevice || isSafari) videoNameToExcept = await videoWatchPage.clickOnFirstVideo() | 62 | if (isMobileDevice || isSafari) videoNameToExcept = await videoWatchPage.clickOnFirstVideo() |
63 | else await videoWatchPage.clickOnVideo(videoName) | 63 | else await videoWatchPage.clickOnVideo(videoName) |
64 | 64 | ||
65 | return videoWatchPage.waitWatchVideoName(videoNameToExcept, isSafari) | 65 | return videoWatchPage.waitWatchVideoName(videoNameToExcept, isMobileDevice, isSafari) |
66 | }) | 66 | }) |
67 | 67 | ||
68 | it('Should play the video', async () => { | 68 | it('Should play the video', async () => { |