Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: createPage error (#1668)

Qi4aea39fb94fc
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<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) {
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();
+ });
+});