X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fe2e%2Fsrc%2Futils%2Felements.ts;h=b0ddd5a65e7bd6d7c6c1406e0c122bdd2a46d6ac;hb=ca4bd9667dc06cf4c84d0399f399e4251027a167;hp=3ffa5defd38c8ef074d341ba39a0a68af6bdd3e3;hpb=3318147300b4f998adf728eb0a5a14a4c1829c51;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/e2e/src/utils/elements.ts b/client/e2e/src/utils/elements.ts index 3ffa5defd..b0ddd5a65 100644 --- a/client/e2e/src/utils/elements.ts +++ b/client/e2e/src/utils/elements.ts @@ -1,9 +1,15 @@ -function getCheckbox (name: string) { - return $(`my-peertube-checkbox input[id=${name}]`).parentElement() +async function getCheckbox (name: string) { + const input = $(`my-peertube-checkbox input[id=${name}]`) + await input.waitForExist() + + return input.parentElement() } async function selectCustomSelect (id: string, valueLabel: string) { - await $(`[formcontrolname=${id}] .ng-arrow-wrapper`).click() + const wrapper = $(`[formcontrolname=${id}] .ng-arrow-wrapper`) + + await wrapper.waitForClickable() + await wrapper.click() const option = await $$(`[formcontrolname=${id}] .ng-option`).filter(async o => { const text = await o.getText()