ci(storybook): fix import page failed problem (#4424)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { routes } from '@affine/core/router';
|
import { routes } from '@affine/core/router';
|
||||||
import { assertExists } from '@blocksuite/global/utils';
|
import { assertExists } from '@blocksuite/global/utils';
|
||||||
import type { StoryFn } from '@storybook/react';
|
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 { Outlet, useLocation } from 'react-router-dom';
|
||||||
import {
|
import {
|
||||||
reactRouterOutlets,
|
reactRouterOutlets,
|
||||||
@@ -157,10 +157,10 @@ ImportPage.play = async ({ canvasElement }) => {
|
|||||||
await userEvent.click(canvas.getByTestId('header-dropDownButton'));
|
await userEvent.click(canvas.getByTestId('header-dropDownButton'));
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
assertExists(
|
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.decorators = [withRouter];
|
||||||
ImportPage.parameters = {
|
ImportPage.parameters = {
|
||||||
|
|||||||
Reference in New Issue
Block a user