mirror of https://github.com/Chocobozzz/PeerTube
Fix Browserstack tests
Signed-off-by: Chocobozzz <me@florianbigard.com>pull/6711/merge
parent
49f3e3b9b9
commit
2214fedd8e
|
@ -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)
|
||||
}
|
||||
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 () {
|
||||
|
|
|
@ -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' })
|
||||
}
|
||||
],
|
||||
|
||||
|
|
Loading…
Reference in New Issue