Fix E2E tests

This commit is contained in:
Chocobozzz 2024-03-06 14:19:11 +01:00
parent 2fc3b90cb7
commit 29fc2db3a2
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 9 additions and 3 deletions

View File

@ -49,7 +49,13 @@ export class PlayerPage {
async playVideo () {
await $('div.video-js.vjs-paused, div.video-js.vjs-playing').waitForExist()
if (await $('div.video-js.vjs-playing').isExisting()) {
if (!isIOS()) return
// On iOS, the web browser may have aborted player autoplay, so check the video is still autoplayed
await browserSleep(5000)
if (await $('div.video-js.vjs-playing').isExisting()) return
}
// Autoplay is disabled on iOS and Safari
if (isIOS() || isSafari() || isMobileDevice()) {

View File

@ -10,7 +10,7 @@ if (!key) throw new Error('Miss browser stack key')
function buildMainOptions (sessionName: string) {
return {
projectName: 'PeerTube',
buildName: 'Main E2E - ' + new Date().toISOString().split('T')[0],
buildName: 'Main E2E - ' + new Date().toISOString(),
sessionName,
consoleLogs: 'info',
networkLogs: true
@ -100,7 +100,7 @@ module.exports = {
{
browserName: 'Safari',
...buildBStackMobileOptions({ sessionName: 'Safari iPhone', deviceName: 'iPhone 8 Plus', osVersion: '12.4' })
...buildBStackMobileOptions({ sessionName: 'Safari iPhone', deviceName: 'iPhone 8', osVersion: '13' })
},
{
browserName: 'Safari',