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()
|
await submit.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isMobileDevice) {
|
await this.ensureIsLoggedInAs(displayName)
|
||||||
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) {
|
async getLoginError (username: string, password: string) {
|
||||||
|
@ -92,13 +80,11 @@ export class LoginPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
async ensureIsLoggedInAs (displayName: string) {
|
async ensureIsLoggedInAs (displayName: string) {
|
||||||
await this.getLoggedInInfoElem().waitForExist()
|
await this.getLoggedInInfoElem(displayName).waitForExist()
|
||||||
|
|
||||||
await expect(this.getLoggedInInfoElem()).toHaveText(displayName)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private getLoggedInInfoElem () {
|
private getLoggedInInfoElem (displayName: string) {
|
||||||
return $('.logged-in-info .display-name')
|
return $('.logged-in-info').$('.display-name*=' + displayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
private getSuffix () {
|
private getSuffix () {
|
||||||
|
|
|
@ -77,7 +77,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
browserName: 'Safari',
|
browserName: 'Safari',
|
||||||
browserVersion: '12.1',
|
browserVersion: '13',
|
||||||
|
|
||||||
...buildBStackDesktopOptions({ sessionName: 'Safari Desktop', resolution: '1280x1024' })
|
...buildBStackDesktopOptions({ sessionName: 'Safari Desktop', resolution: '1280x1024' })
|
||||||
},
|
},
|
||||||
|
@ -102,10 +102,11 @@ module.exports = {
|
||||||
|
|
||||||
...buildBStackMobileOptions({ sessionName: 'Safari iPhone', deviceName: 'iPhone 11', osVersion: '13' })
|
...buildBStackMobileOptions({ sessionName: 'Safari iPhone', deviceName: 'iPhone 11', osVersion: '13' })
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
browserName: 'Safari',
|
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