Fix E2E tests

This commit is contained in:
Chocobozzz 2023-11-06 08:56:56 +01:00
parent d3c9a2e5b9
commit 96bb9de7d0
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 7 additions and 6 deletions

View file

@ -47,7 +47,9 @@ export class PlayerPage {
}
async playVideo () {
await $('div.video-js.vjs-paused').waitForExist()
await $('div.video-js.vjs-paused, div.video-js.vjs-playing').waitForExist()
if (await $('div.video-js.vjs-playing').isExisting()) return
// Autoplay is disabled on iOS and Safari
if (isIOS() || isSafari() || isMobileDevice()) {

View file

@ -26,7 +26,6 @@ function isIOS () {
async function go (url: string) {
await browser.url(url)
// Hide notifications that could fail tests when hiding buttons
await browser.execute(() => {
const style = document.createElement('style')
style.innerHTML = 'p-toast { display: none }'

View file

@ -59,7 +59,7 @@ export const config = {
// with `/`, the base url gets prepended, not including the path portion of your baseUrl.
// If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
// gets prepended directly.
baseUrl: 'http://localhost:9001',
baseUrl: 'http://127.0.0.1:9001',
//
// Default timeout for all waitFor* commands.
waitforTimeout: 5000,
@ -80,7 +80,7 @@ export const config = {
framework: 'mocha',
//
// The number of times to retry the entire specfile when it fails as a whole
specFileRetries: 1,
specFileRetries: 2,
//
// Delay in seconds between the spec file retry attempts
// specFileRetriesDelay: 0,

View file

@ -1,6 +1,6 @@
export const environment = {
production: false,
hmr: false,
apiUrl: 'http://localhost:9001',
originServerUrl: 'http://localhost:9001'
apiUrl: 'http://127.0.0.1:9001',
originServerUrl: 'http://127.0.0.1:9001'
}