From 4aea39fb94fc877622b1718c4dae9e6f42b2c388 Mon Sep 17 00:00:00 2001 From: Qi <474021214@qq.com> Date: Thu, 23 Mar 2023 18:01:58 +0800 Subject: [PATCH] fix: createPage error (#1668) --- .../components/pure/quick-search-modal/Footer.tsx | 2 +- tests/subpage.spec.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/subpage.spec.ts diff --git a/apps/web/src/components/pure/quick-search-modal/Footer.tsx b/apps/web/src/components/pure/quick-search-modal/Footer.tsx index 67f4fe3dc8..7835f75348 100644 --- a/apps/web/src/components/pure/quick-search-modal/Footer.tsx +++ b/apps/web/src/components/pure/quick-search-modal/Footer.tsx @@ -38,7 +38,7 @@ export const Footer: React.FC = ({ 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) { diff --git a/tests/subpage.spec.ts b/tests/subpage.spec.ts new file mode 100644 index 0000000000..e30e6d18a8 --- /dev/null +++ b/tests/subpage.spec.ts @@ -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(); + }); +});