mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
refactor(editor): do not create a tag column by default anymore (#9789)
close: BS-2423
This commit is contained in:
@@ -71,22 +71,28 @@ export async function verifyCellContents(
|
||||
}
|
||||
}
|
||||
|
||||
export async function selectColumnType(page: Page, columnType: string) {
|
||||
export async function selectColumnType(
|
||||
page: Page,
|
||||
columnType: string,
|
||||
nth: number = 1
|
||||
) {
|
||||
const typeMenu = page.locator('affine-menu').getByText('Type');
|
||||
await page.waitForTimeout(100);
|
||||
await typeMenu.hover();
|
||||
await page.waitForTimeout(100);
|
||||
await page.keyboard.type(columnType);
|
||||
await page.waitForTimeout(100);
|
||||
await page.keyboard.press('ArrowDown');
|
||||
for (let i = 0; i < nth; i++) {
|
||||
await page.keyboard.press('ArrowDown');
|
||||
}
|
||||
await page.waitForTimeout(100);
|
||||
await page.keyboard.press('Enter');
|
||||
await page.waitForTimeout(100);
|
||||
}
|
||||
|
||||
export async function addColumn(page: Page, type: string) {
|
||||
export async function addColumn(page: Page, type: string, nth: number = 1) {
|
||||
await clickAddColumnButton(page);
|
||||
await selectColumnType(page, type);
|
||||
await selectColumnType(page, type, nth);
|
||||
}
|
||||
|
||||
export async function clickAddColumnButton(page: Page) {
|
||||
|
||||
Reference in New Issue
Block a user