From 2214fedd8ee8a547cd03d74bd2e02d68f4d1bee2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 26 Nov 2024 16:21:38 +0100 Subject: [PATCH] Fix Browserstack tests Signed-off-by: Chocobozzz --- client/e2e/src/po/login.po.ts | 22 ++++------------------ client/e2e/wdio.browserstack.conf.ts | 5 +++-- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/client/e2e/src/po/login.po.ts b/client/e2e/src/po/login.po.ts index fad2b23ac..4826b8992 100644 --- a/client/e2e/src/po/login.po.ts +++ b/client/e2e/src/po/login.po.ts @@ -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 () { diff --git a/client/e2e/wdio.browserstack.conf.ts b/client/e2e/wdio.browserstack.conf.ts index cb7fd3229..b3e18cad4 100644 --- a/client/e2e/wdio.browserstack.conf.ts +++ b/client/e2e/wdio.browserstack.conf.ts @@ -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' }) } ],