diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | client/e2e/src/po/video-watch.po.ts | 7 | ||||
-rw-r--r-- | client/e2e/src/videos.e2e-spec.ts | 4 |
3 files changed, 9 insertions, 6 deletions
@@ -24,8 +24,8 @@ directly in the web browser with <a href="https://github.com/feross/webtorrent"> | |||
24 | <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg?path=client" alt="devDependency Status" /> | 24 | <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg?path=client" alt="devDependency Status" /> |
25 | </a> | 25 | </a> |
26 | 26 | ||
27 | <a href="https://www.browserstack.com/automate/public-build/VXBPc0szNjUvRUNsREJQRFF6RkEvSjJBclZ4VUJBUm1hcS9RZGpUbitRST0tLWFWbjNEdVN6eEZpYTk4dGVpMkVlQWc9PQ==--644e755052bf7fe2346eb6e868be8e706718a17c%"> | 27 | <a href="https://www.browserstack.com/automate/public-build/cWJhRDFJbS9qeUhzYW04MnlIVjlQQ0x3aE5POXBaV1lycGo5VlQxK3JqZz0tLTNUWW5ySEVvS1N4UnBhYlhsdXVCeVE9PQ==--db09e291d36a582af8b2929d62a625ed660cdf1d"> |
28 | <img src='https://www.browserstack.com/automate/badge.svg?badge_key=VXBPc0szNjUvRUNsREJQRFF6RkEvSjJBclZ4VUJBUm1hcS9RZGpUbitRST0tLWFWbjNEdVN6eEZpYTk4dGVpMkVlQWc9PQ==--644e755052bf7fe2346eb6e868be8e706718a17c%'/> | 28 | <img src='https://www.browserstack.com/automate/badge.svg?badge_key=cWJhRDFJbS9qeUhzYW04MnlIVjlQQ0x3aE5POXBaV1lycGo5VlQxK3JqZz0tLTNUWW5ySEVvS1N4UnBhYlhsdXVCeVE9PQ==--db09e291d36a582af8b2929d62a625ed660cdf1d'/> |
29 | </a> | 29 | </a> |
30 | </p> | 30 | </p> |
31 | 31 | ||
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 () => { |