mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 00:26:51 +08:00
ci(storybook): fix import page failed problem (#4424)
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user