Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function powerSelectOptions(parentSelector, dropdownSelector) {
let originalOptions = document.querySelectorAll(`${dropdownSelector} .ember-power-select-option`);
if (!originalOptions.length) {
await clickTrigger(parentSelector);
}
let actualOptions = Array.from(document.querySelectorAll(`${dropdownSelector} .ember-power-select-option`)).map((option) => option.textContent.trim());
if (!originalOptions.length) {
await clickTrigger(parentSelector);
}
return actualOptions;
}