X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fe2e%2Fsrc%2Fpo%2Fmy-account.po.ts;h=5188eca1128b2b8db8af338513035eb9436a26ef;hb=a41b944398af03ad7594380ad1cb7a978f6417cb;hp=20dafbf0616eccb06ce1b3b58fd7b6471ea4a13c;hpb=c3edc5b074aa4bb1861ed0a94d3713808e87170f;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 20dafbf06..5188eca11 100644 --- a/client/e2e/src/po/my-account.po.ts +++ b/client/e2e/src/po/my-account.po.ts @@ -24,7 +24,9 @@ export class MyAccountPage { const nsfw = $('#nsfwPolicy') await nsfw.waitForDisplayed() - await nsfw.scrollIntoView(false) // Avoid issues with fixed header on firefox + await nsfw.scrollIntoView({ block: 'center' }) // Avoid issues with fixed header + await nsfw.waitForClickable() + await nsfw.selectByAttribute('value', newValue) await this.submitVideoSettings() @@ -34,7 +36,7 @@ export class MyAccountPage { const p2p = await getCheckbox('p2pEnabled') await p2p.waitForClickable() - await p2p.scrollIntoView(false) // Avoid issues with fixed header on firefox + await p2p.scrollIntoView({ block: 'center' }) // Avoid issues with fixed header await p2p.click() @@ -43,7 +45,9 @@ export class MyAccountPage { private async submitVideoSettings () { const submit = $('my-user-video-settings input[type=submit]') - await submit.scrollIntoView(false) + + await submit.waitForClickable() + await submit.scrollIntoView({ block: 'center' }) // Avoid issues with fixed header await submit.click() } @@ -54,10 +58,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() + + return text.includes('Delete') + }) + } + + await (await deleteItem()).waitForClickable() - await dropdownMenu().waitForDisplayed() - return dropdownMenu().click() + return (await deleteItem()).click() } validRemove () {