Files
calendar/apps/web/playwright/lib/pageObject.ts
Hariom BalharaandGitHub ef0ba48f49 fix: Invalid options for Select and MultiSelect when both legacy and new options(i.e. with and without id are present) (#16509)
* Fix invalid select options

* Add test for multiselect filling and fix bug with csv reporting

* Fix options getting duplicated

* Add getQueryBuilderConfig tests
2024-09-07 03:07:47 +00:00

20 lines
484 B
TypeScript

import type { Page } from "@playwright/test";
export const selectInteractions = {
async chooseOption({
page,
selector,
optionText,
}: {
page: Page;
selector: string;
optionText: string;
}): Promise<void> {
// Open dropdown
await page.locator(selector).click();
const selectParentWithOptions = page.locator(`:has(> ${selector})`);
// Select option
await selectParentWithOptions.getByText(optionText, { exact: true }).click();
},
};