mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 13:58:50 +08:00
feat: replace menu with new design (#4012)
Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
@@ -200,20 +200,12 @@ export const createPageWithTag = async (
|
||||
await page.keyboard.press('Escape');
|
||||
};
|
||||
|
||||
export const changeFilter = async (page: Page, to: string | RegExp) => {
|
||||
export const changeFilter = async (page: Page, to: string) => {
|
||||
await page.getByTestId('filter-name').click();
|
||||
await page
|
||||
.getByTestId('filter-name-select')
|
||||
.locator('button', { hasText: to })
|
||||
.click();
|
||||
await page.getByTestId(`filler-tag-${to}`).click();
|
||||
};
|
||||
|
||||
export async function selectTag(page: Page, name: string | RegExp) {
|
||||
await page.getByTestId('filter-arg').click();
|
||||
await page
|
||||
.getByTestId('multi-select')
|
||||
.getByTestId('select-option')
|
||||
.getByText(name, { exact: true })
|
||||
.click();
|
||||
await page.getByTestId('filter-arg').click();
|
||||
await page.getByTestId(`multi-select-${name}`).click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user