]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix local E2E tests
authorChocobozzz <me@florianbigard.com>
Fri, 20 May 2022 12:18:20 +0000 (14:18 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 20 May 2022 12:18:20 +0000 (14:18 +0200)
client/e2e/src/po/my-account.po.ts
client/e2e/src/utils/server.ts

index 20dafbf0616eccb06ce1b3b58fd7b6471ea4a13c..8d5d878cef067bfddd0d59cc77616bd9a22b6f89 100644 (file)
@@ -54,10 +54,17 @@ export class MyAccountPage {
 
     await container.$('.dropdown-toggle').click()
 
-    const dropdownMenu = () => container.$$('.dropdown-menu .dropdown-item')[1]
+    const deleteItem = () => {
+      return $$('.dropdown-menu .dropdown-item').find<WebdriverIO.Element>(async v => {
+        const text = await v.getText()
 
-    await dropdownMenu().waitForDisplayed()
-    return dropdownMenu().click()
+        return text.includes('Delete')
+      })
+    }
+
+    await (await deleteItem()).waitForClickable()
+
+    return (await deleteItem()).click()
   }
 
   validRemove () {
index 7089a5c9cdd127d8a791333f62a4b34cbd194000..a0c59163058e191a9b78319f39088aa0a3161981 100644 (file)
@@ -24,6 +24,9 @@ function runServer (appInstance: string, config: any = {}) {
     transcoding: {
       enabled: false
     },
+    video_studio: {
+      enabled: false
+    },
 
     ...config
   })