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

@@ -0,0 +1,23 @@
import { openHomePage } from '@affine-test/kit/utils/load-page';
import {
addCodeBlock,
clickNewPageButton,
waitForEditorLoad,
} from '@affine-test/kit/utils/page-logic';
import type { Page } from '@playwright/test';
export const gotoContentFromTitle = async (page: Page) => {
await page.keyboard.press('Enter');
};
export const createNewPage = async (page: Page) => {
await clickNewPageButton(page);
};
export const initCodeBlockByOneStep = async (page: Page) => {
await openHomePage(page);
await createNewPage(page);
await waitForEditorLoad(page);
await gotoContentFromTitle(page);
await addCodeBlock(page);
};