fix: createPage error (#1668)

This commit is contained in:
Qi 2023-03-23 18:01:58 +08:00 committed by GitHub
parent 6be94ca906
commit 4aea39fb94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -38,7 +38,7 @@ export const Footer: React.FC<FooterProps> = ({
onSelect={async () => {
onClose();
const id = nanoid();
const page = await createPage(id, query);
const page = await createPage(id);
assertEquals(page.id, id);
await jumpToPage(blockSuiteWorkspace.id, page.id);
if (!query) {

14
tests/subpage.spec.ts Normal file
View File

@ -0,0 +1,14 @@
import { expect } from '@playwright/test';
import { loadPage } from './libs/load-page';
import { test } from './libs/playwright';
loadPage();
test.describe('subpage', () => {
test('Create subpage', async ({ page }) => {
await page.getByTestId('sliderBar-arrowButton-collapse').click();
const sliderBarArea = page.getByTestId('sliderBar');
await expect(sliderBarArea).not.toBeVisible();
});
});