]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Improve login test reliability for ios
authorChocobozzz <me@florianbigard.com>
Mon, 31 Oct 2022 08:57:17 +0000 (09:57 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 31 Oct 2022 08:57:17 +0000 (09:57 +0100)
client/e2e/src/po/login.po.ts

index 91bf46e302225a9103f216931f91c372bb01a5ac..bc1854dbc17012fcae2ba5b951784ff7828a1e0d 100644 (file)
@@ -20,18 +20,18 @@ export class LoginPage {
 
     await $('form input[type=submit]').click()
 
-    const menuToggle = $('.top-left-block span[role=button]')
-
     if (this.isMobileDevice) {
-      await browser.pause(1000)
+      const menuToggle = $('.top-left-block span[role=button]')
+
+      await $('h2=Our content selection').waitForDisplayed()
 
       await menuToggle.click()
-    }
 
-    await this.ensureIsLoggedInAs(username)
+      await this.ensureIsLoggedInAs(username)
 
-    if (this.isMobileDevice) {
       await menuToggle.click()
+    } else {
+      await this.ensureIsLoggedInAs(username)
     }
   }