blob: 315718879978fe9b9cec76390b15dff8b5e64390 (
plain) (
tree)
|
|
function getCheckbox (name: string) {
return $(`my-peertube-checkbox[inputname=${name}] label`)
}
async function selectCustomSelect (id: string, valueLabel: string) {
await $(`[formcontrolname=${id}] .ng-arrow-wrapper`).click()
const option = await $$(`[formcontrolname=${id}] .ng-option`).filter(async o => {
const text = await o.getText()
return text.trimStart().startsWith(valueLabel)
}).then(options => options[0])
await option.waitForDisplayed()
return option.click()
}
export {
getCheckbox,
selectCustomSelect
}
|