fix: title behavior on BlockSuite editor (#1264)

This commit is contained in:
Himself65 authored and GitHub committed 2023-03-02 17:38:17 +00:00
1 parent 32a1b7b8a3
commit eeb636e81c
20 files changed
+155 -126

No files matched your search

+9 -5
View File
@@ -1,15 +1,19 @@
import { expect } from '@playwright/test';
import { loadPage } from './libs/load-page';
import { clickPageMoreActions, newPage } from './libs/page-logic';
import {
clickPageMoreActions,
getBlockSuiteEditorTitle,
newPage,
} from './libs/page-logic';
import { test } from './libs/playwright';
loadPage();
test.describe('Local first delete page', () => {
test('New a page ,then open it and show delete modal', async ({ page }) => {
await newPage(page);
await page.getByPlaceholder('Title').click();
await page.getByPlaceholder('Title').fill('this is a new page to delete');
await getBlockSuiteEditorTitle(page).click();
await getBlockSuiteEditorTitle(page).fill('this is a new page to delete');
await page.getByRole('link', { name: 'All pages' }).click();
const cell = page.getByRole('cell', {
name: 'this is a new page to delete',
@@ -28,8 +32,8 @@ test.describe('Local first delete page', () => {
page,
}) => {
await newPage(page);
await page.getByPlaceholder('Title').click();
await page.getByPlaceholder('Title').fill('this is a new page to delete');
await getBlockSuiteEditorTitle(page).click();
await getBlockSuiteEditorTitle(page).fill('this is a new page to delete');
const newPageId = page.url().split('/').reverse()[0];
await page.getByRole('link', { name: 'All pages' }).click();
const cell = page.getByRole('cell', {