Fix local e2e tests

This commit is contained in:
Chocobozzz 2021-03-05 10:26:10 +01:00
parent ada9762f81
commit f74832ce17
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 8 additions and 6 deletions

View File

@ -38,7 +38,7 @@ exports.config = {
}
],
// maxSessions: 1,
maxSessions: 1,
baseUrl: 'http://localhost:3000/',
framework: 'jasmine',
jasmineNodeOpts: {

View File

@ -9,6 +9,8 @@ export class AppPage {
await element(by.css('.configure-instance-button')).click()
await browser.sleep(5000)
await browser.switchTo().window(firstHandle)
}
}

View File

@ -3,11 +3,10 @@ import { browserSleep, isIOS, isMobileDevice, isSafari } from '../utils'
export class PlayerPage {
getWatchVideoPlayerCurrentTime () {
return element(by.css('.video-js .vjs-current-time-display'))
.getText()
.then((t: string) => t.split(':')[1])
.then(seconds => parseInt(seconds, 10))
async getWatchVideoPlayerCurrentTime () {
const elem = element(by.css('video'))
return elem.getAttribute('currentTime')
}
waitUntilPlaylistInfo (text: string) {

View File

@ -158,6 +158,7 @@ describe('Videos workflow', () => {
await videoWatchPage.createPlaylist(playlistName)
await videoWatchPage.saveToPlaylist(playlistName)
await browser.sleep(5000)
await videoUploadPage.navigateTo()