diff options
author | Chocobozzz <me@florianbigard.com> | 2022-05-20 14:18:20 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-05-20 14:18:20 +0200 |
commit | a6241926d23c80fe4c830f069e82b8a19469ace0 (patch) | |
tree | 8916b5653b4db66c169538a609ac3006d5803e7c /client/e2e/src/po/my-account.po.ts | |
parent | ff3911ad07f1deb9610ebf066dea63b20d68edc5 (diff) | |
download | PeerTube-a6241926d23c80fe4c830f069e82b8a19469ace0.tar.gz PeerTube-a6241926d23c80fe4c830f069e82b8a19469ace0.tar.zst PeerTube-a6241926d23c80fe4c830f069e82b8a19469ace0.zip |
Fix local E2E tests
Diffstat (limited to 'client/e2e/src/po/my-account.po.ts')
-rw-r--r-- | client/e2e/src/po/my-account.po.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/client/e2e/src/po/my-account.po.ts b/client/e2e/src/po/my-account.po.ts index 20dafbf06..8d5d878ce 100644 --- a/client/e2e/src/po/my-account.po.ts +++ b/client/e2e/src/po/my-account.po.ts | |||
@@ -54,10 +54,17 @@ export class MyAccountPage { | |||
54 | 54 | ||
55 | await container.$('.dropdown-toggle').click() | 55 | await container.$('.dropdown-toggle').click() |
56 | 56 | ||
57 | const dropdownMenu = () => container.$$('.dropdown-menu .dropdown-item')[1] | 57 | const deleteItem = () => { |
58 | return $$('.dropdown-menu .dropdown-item').find<WebdriverIO.Element>(async v => { | ||
59 | const text = await v.getText() | ||
58 | 60 | ||
59 | await dropdownMenu().waitForDisplayed() | 61 | return text.includes('Delete') |
60 | return dropdownMenu().click() | 62 | }) |
63 | } | ||
64 | |||
65 | await (await deleteItem()).waitForClickable() | ||
66 | |||
67 | return (await deleteItem()).click() | ||
61 | } | 68 | } |
62 | 69 | ||
63 | validRemove () { | 70 | validRemove () { |