Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom blocks tab #4519

Closed
wants to merge 24 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add option to get Values that are set
  • Loading branch information
thecalcc committed May 21, 2024
commit 951ba6866a6fc56c0fde723cefc47505c7a334d7
16 changes: 14 additions & 2 deletions e2e/client/playwright/utils/tree-select-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@
/**
* Get all available options.
*/
async getValues(page: Page): Promise<Array<string>> {
async getOptions(page: Page): Promise<Array<string>> {
await page.locator(s('open-popover')).click();

return page.locator(s('tree-select-popover', 'options')).getByRole('button').all()
.then((buttons) => Promise.all(buttons.map((button) => button.innerText())));
},

/**
* Get options that are set.
*/
async getValues(page: Page): Promise<Array<string>> {
return await page.locator(s(dataTestId, 'item')).all().then((buttons) => {
return Promise.all(buttons.map((button) => button.innerText()))

Check failure on line 21 in e2e/client/playwright/utils/tree-select-driver.ts

View workflow job for this annotation

GitHub Actions / test

Missing semicolon
});

// return page.locator(s('tree-select-popover', 'options')).getByRole('button').all()
// .then((buttons) => Promise.all(buttons.map((button) => button.innerText())));
},

/**
* Add an option/options to the already set options.
*/
Expand All @@ -25,7 +37,7 @@
.getByRole('button', {name: new RegExp(option, 'i')})
.click();
} else if (option != null) {
setOptions(option);
await setOptions(option);
}
}
};
Expand Down
Loading