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.

ci(storybook): fix import page failed problem (#4424)

Joooye_34e2764179bc0c
diff --git a/apps/storybook/src/stories/core.stories.tsx b/apps/storybook/src/stories/core.stories.tsx
index 0e49a50842..b3eb9796d2 100644
--- a/apps/storybook/src/stories/core.stories.tsx
+++ b/apps/storybook/src/stories/core.stories.tsx
@@ -1,7 +1,7 @@
import { routes } from '@affine/core/router';
import { assertExists } from '@blocksuite/global/utils';
import type { StoryFn } from '@storybook/react';
-import { userEvent, waitFor, within } from '@storybook/testing-library';
+import { screen, userEvent, waitFor, within } from '@storybook/testing-library';
import { Outlet, useLocation } from 'react-router-dom';
import {
reactRouterOutlets,
@@ -157,10 +157,10 @@ ImportPage.play = async ({ canvasElement }) => {
await userEvent.click(canvas.getByTestId('header-dropDownButton'));
await waitFor(() => {
assertExists(
- canvasElement.querySelector('[data-testid="editor-option-menu-import"]')
+ document.body.querySelector('[data-testid="editor-option-menu-import"]')
);
});
- await userEvent.click(canvas.getByTestId('editor-option-menu-import'));
+ await userEvent.click(screen.getByTestId('editor-option-menu-import'));
};
ImportPage.decorators = [withRouter];
ImportPage.parameters = {