<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>
.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)
let isSafari = false
beforeEach(async () => {
- browser.waitForAngularEnabled(false)
+ await browser.waitForAngularEnabled(false)
videoWatchPage = new VideoWatchPage()
pageUploadPage = new VideoUploadPage()
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 () => {