Fix client e2e tests
This commit is contained in:
parent
93ea9c47d9
commit
6247b2057b
|
@ -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>
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
Loading…
Reference in New Issue