Fix Browserstack tests

Signed-off-by: Chocobozzz <me@florianbigard.com>
pull/6752/head
Chocobozzz 2024-11-26 16:21:38 +01:00
parent 49f3e3b9b9
commit 2214fedd8e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 7 additions and 20 deletions

View File

@ -35,19 +35,7 @@ export class LoginPage {
await submit.click()
}
if (this.isMobileDevice) {
const menuToggle = $('.top-left-block button')
await $('h2=Our content selection').waitForDisplayed()
await menuToggle.click()
await this.ensureIsLoggedInAs(displayName)
await menuToggle.click()
} else {
await this.ensureIsLoggedInAs(displayName)
}
}
async getLoginError (username: string, password: string) {
@ -92,13 +80,11 @@ export class LoginPage {
}
async ensureIsLoggedInAs (displayName: string) {
await this.getLoggedInInfoElem().waitForExist()
await expect(this.getLoggedInInfoElem()).toHaveText(displayName)
await this.getLoggedInInfoElem(displayName).waitForExist()
}
private getLoggedInInfoElem () {
return $('.logged-in-info .display-name')
private getLoggedInInfoElem (displayName: string) {
return $('.logged-in-info').$('.display-name*=' + displayName)
}
private getSuffix () {

View File

@ -77,7 +77,7 @@ module.exports = {
},
{
browserName: 'Safari',
browserVersion: '12.1',
browserVersion: '13',
...buildBStackDesktopOptions({ sessionName: 'Safari Desktop', resolution: '1280x1024' })
},
@ -102,10 +102,11 @@ module.exports = {
...buildBStackMobileOptions({ sessionName: 'Safari iPhone', deviceName: 'iPhone 11', osVersion: '13' })
},
{
browserName: 'Safari',
...buildBStackMobileOptions({ sessionName: 'Safari iPad', deviceName: 'iPad 7th', osVersion: '13' })
...buildBStackMobileOptions({ sessionName: 'Safari iPad', deviceName: 'iPad Pro 11 2020', osVersion: '13' })
}
],