mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
test: cover share page e2e (#4126)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { test } from '@affine-test/kit/playwright';
|
||||
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
||||
import {
|
||||
clickNewPageButton,
|
||||
getBlockSuiteEditorTitle,
|
||||
newPage,
|
||||
waitForEditorLoad,
|
||||
} from '@affine-test/kit/utils/page-logic';
|
||||
import type { Page } from '@playwright/test';
|
||||
@@ -20,7 +20,7 @@ const addDatabase = async (page: Page) => {
|
||||
test('database is useable', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitForEditorLoad(page);
|
||||
await newPage(page);
|
||||
await clickNewPageButton(page);
|
||||
await waitForEditorLoad(page);
|
||||
const title = getBlockSuiteEditorTitle(page);
|
||||
await title.type('test title');
|
||||
@@ -31,7 +31,7 @@ test('database is useable', async ({ page }) => {
|
||||
await expect(database).toBeVisible();
|
||||
await page.reload();
|
||||
await waitForEditorLoad(page);
|
||||
await newPage(page);
|
||||
await clickNewPageButton(page);
|
||||
await waitForEditorLoad(page);
|
||||
const title2 = getBlockSuiteEditorTitle(page);
|
||||
await title2.type('test title2');
|
||||
@@ -46,13 +46,13 @@ test('database is useable', async ({ page }) => {
|
||||
test('link page is useable', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitForEditorLoad(page);
|
||||
await newPage(page);
|
||||
await clickNewPageButton(page);
|
||||
await waitForEditorLoad(page);
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.type('page1');
|
||||
await page.keyboard.press('Enter');
|
||||
expect(await title.innerText()).toBe('page1');
|
||||
await newPage(page);
|
||||
await clickNewPageButton(page);
|
||||
await waitForEditorLoad(page);
|
||||
const title2 = await getBlockSuiteEditorTitle(page);
|
||||
await title2.type('page2');
|
||||
|
||||
Reference in New Issue
Block a user