fix(web): minor bug fixes (#9696)

Co-authored-by: Mirone <Saul-Mirone@outlook.com>
This commit is contained in:
Oleg
2025-01-27 06:21:41 +01:00
committed by GitHub
parent 73b4437081
commit e3fac97b9b
6 changed files with 47 additions and 6 deletions

View File

@@ -230,6 +230,13 @@ export const addDatabase = async (page: Page, title?: string) => {
}
};
export const addCodeBlock = async (page: Page) => {
await page.keyboard.press('/');
await expect(page.locator('affine-slash-menu .slash-menu')).toBeVisible();
await page.keyboard.type('code');
await page.getByTestId('Code Block').click();
};
export const addDatabaseRow = async (page: Page, databaseTitle: string) => {
const db = page.locator(`affine-database-table`, {
has: page.locator(`affine-database-title:has-text("${databaseTitle}")`),