Fix storybook tests (#6150)

The PRs merged on Friday introduced regressions on our storybook tests
suite
This commit is contained in:
Charles Bochet
2024-07-06 09:32:30 +02:00
committed by GitHub
parent 7b3a590f79
commit 46dac5a0ef
10 changed files with 44 additions and 47 deletions

View File

@ -35,8 +35,8 @@ type Story = StoryObj<typeof SettingsObjectInactiveMenuDropDown>;
export const Default: Story = {};
export const Open: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
play: async () => {
const canvas = within(document.body);
const dropdownButton = await canvas.getByRole('button');
@ -45,8 +45,8 @@ export const Open: Story = {
};
export const WithActivate: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
play: async () => {
const canvas = within(document.body);
const dropdownButton = await canvas.getByRole('button');
@ -66,8 +66,8 @@ export const WithActivate: Story = {
export const WithDelete: Story = {
args: { isCustomObject: true },
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
play: async () => {
const canvas = within(document.body);
const dropdownButton = await canvas.getByRole('button');

View File

@ -1,5 +1,5 @@
import { Controller, useFormContext } from 'react-hook-form';
import styled from '@emotion/styled';
import { Controller, useFormContext } from 'react-hook-form';
import { z } from 'zod';
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';