chore: optimized style (#4098)

This commit is contained in:
JimmFly
2023-09-02 03:28:16 +08:00
committed by GitHub
parent 189e91e6ca
commit 8845bb9b4b
9 changed files with 70 additions and 26 deletions

View File

@@ -1,6 +1,7 @@
import { test } from '@affine-test/kit/playwright';
import { openHomePage } from '@affine-test/kit/utils/load-page';
import {
clickPageMoreActions,
getBlockSuiteEditorTitle,
newPage,
waitEditorLoad,
@@ -43,3 +44,21 @@ test('New a page , then delete it in all pages, finally find it in trash', async
expect(currentWorkspace.flavour).toContain('local');
});
test('New a page , then delete it in page, blockHub and option menu will not appear ', async ({
page,
}) => {
await openHomePage(page);
await waitEditorLoad(page);
await newPage(page);
const title = getBlockSuiteEditorTitle(page);
await title.type('test');
await clickPageMoreActions(page);
await page.getByTestId('editor-option-menu-delete').click();
await page.getByTestId('confirm-delete-page').click();
await expect(page.getByTestId('header-dropDownButton')).not.toBeVisible();
await expect(page.getByTestId('block-hub')).not.toBeVisible();
await page.getByTestId('page-restore-button').click();
await expect(page.getByTestId('header-dropDownButton')).toBeVisible();
await expect(page.getByTestId('block-hub')).toBeVisible();
});