Fix storybook and chromatic tests and fix Block editor custom slash menu positioning (#11580)

Storybook / Chromatic fixes:
- fix linaria twenty-ui style loading (since twenty-ui prebuild
refactoring)
- update prefetch view mocks
- add ability to disable hotkeys initialization in storybook to avoid
race condition

Custom slash menu positioning fix
This commit is contained in:
Charles Bochet
2025-04-15 14:57:35 +02:00
committed by GitHub
parent 9da2a74d9e
commit 7bab6cab41
6 changed files with 47 additions and 81 deletions

View File

@ -1,9 +1,9 @@
import { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, waitFor, within } from '@storybook/test';
import { WorkflowStepHeader } from '../WorkflowStepHeader';
import { ComponentDecorator } from 'twenty-ui/testing';
import { IconPlus } from 'twenty-ui/display';
import { ComponentDecorator } from 'twenty-ui/testing';
import { THEME_LIGHT } from 'twenty-ui/theme';
import { WorkflowStepHeader } from '../WorkflowStepHeader';
const meta: Meta<typeof WorkflowStepHeader> = {
title: 'Modules/Workflow/WorkflowStepHeader',
@ -13,6 +13,9 @@ const meta: Meta<typeof WorkflowStepHeader> = {
},
argTypes: {},
decorators: [ComponentDecorator],
parameters: {
disableHotkeyInitialization: true,
},
};
export default meta;
@ -45,7 +48,6 @@ export const EditableTitle: Story = {
},
play: async ({ canvasElement, args }) => {
const canvas = within(canvasElement);
// First find the div with the text, then click it to activate the input
const titleText = await canvas.findByText('Create Record');
await userEvent.click(titleText);