X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fe2e%2Fsrc%2Fpo%2Fmy-account.po.ts;h=8d5d878cef067bfddd0d59cc77616bd9a22b6f89;hb=4e56f0fff12ab9840574e7a27277fc78b195b3e2;hp=13a764e8782464c087a1975924deb907851e2f00;hpb=a9bfa85d2cdf13670aaced740da5b493fbeddfce;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/e2e/src/po/my-account.po.ts b/client/e2e/src/po/my-account.po.ts index 13a764e87..8d5d878ce 100644 --- a/client/e2e/src/po/my-account.po.ts +++ b/client/e2e/src/po/my-account.po.ts @@ -31,7 +31,7 @@ export class MyAccountPage { } async clickOnP2PCheckbox () { - const p2p = getCheckbox('p2pEnabled') + const p2p = await getCheckbox('p2pEnabled') await p2p.waitForClickable() await p2p.scrollIntoView(false) // Avoid issues with fixed header on firefox @@ -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(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 () {