Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix client e2e tests

Chocobozzz6247b2057b79
diff --git a/README.md b/README.md
index 9fb89039b4..3985f38bdf 100644
--- a/README.md
+++ b/README.md
@@ -24,8 +24,8 @@ directly in the web browser with <a href="https://github.com/feross/webtorrent">
<img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg?path=client" alt="devDependency Status" />
</a>
- <a href="https://www.browserstack.com/automate/public-build/VXBPc0szNjUvRUNsREJQRFF6RkEvSjJBclZ4VUJBUm1hcS9RZGpUbitRST0tLWFWbjNEdVN6eEZpYTk4dGVpMkVlQWc9PQ==--644e755052bf7fe2346eb6e868be8e706718a17c%">
- <img src='https://www.browserstack.com/automate/badge.svg?badge_key=VXBPc0szNjUvRUNsREJQRFF6RkEvSjJBclZ4VUJBUm1hcS9RZGpUbitRST0tLWFWbjNEdVN6eEZpYTk4dGVpMkVlQWc9PQ==--644e755052bf7fe2346eb6e868be8e706718a17c%'/>
+ <a href="https://www.browserstack.com/automate/public-build/cWJhRDFJbS9qeUhzYW04MnlIVjlQQ0x3aE5POXBaV1lycGo5VlQxK3JqZz0tLTNUWW5ySEVvS1N4UnBhYlhsdXVCeVE9PQ==--db09e291d36a582af8b2929d62a625ed660cdf1d">
+ <img src='https://www.browserstack.com/automate/badge.svg?badge_key=cWJhRDFJbS9qeUhzYW04MnlIVjlQQ0x3aE5POXBaV1lycGo5VlQxK3JqZz0tLTNUWW5ySEVvS1N4UnBhYlhsdXVCeVE9PQ==--db09e291d36a582af8b2929d62a625ed660cdf1d'/>
</a>
</p>
diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts
index 13f4ae9459..e17aebc298 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 {
.then((texts: any) => texts.map(t => t.trim()))
}
- waitWatchVideoName (videoName: string, isSafari: boolean) {
- const elem = element(by.css('.video-info .video-info-name'))
+ waitWatchVideoName (videoName: string, isMobileDevice: boolean, isSafari: boolean) {
+ // On mobile we display the first node, on desktop the second
+ const index = isMobileDevice ? 0 : 1
+
+ const elem = element.all(by.css('.video-info .video-info-name')).get(index)
if (isSafari) return browser.sleep(5000)
diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts
index 3d4d46292c..606b6ac5d1 100644
--- a/client/e2e/src/videos.e2e-spec.ts
+++ b/client/e2e/src/videos.e2e-spec.ts
@@ -12,7 +12,7 @@ describe('Videos workflow', () => {
let isSafari = false
beforeEach(async () => {
- browser.waitForAngularEnabled(false)
+ await browser.waitForAngularEnabled(false)
videoWatchPage = new VideoWatchPage()
pageUploadPage = new VideoUploadPage()
@@ -62,7 +62,7 @@ describe('Videos workflow', () => {
if (isMobileDevice || isSafari) videoNameToExcept = await videoWatchPage.clickOnFirstVideo()
else await videoWatchPage.clickOnVideo(videoName)
- return videoWatchPage.waitWatchVideoName(videoNameToExcept, isSafari)
+ return videoWatchPage.waitWatchVideoName(videoNameToExcept, isMobileDevice, isSafari)
})
it('Should play the video', async () => {