Fix Storybook tests (#9554)

Finally fixing the storybook tests!
This commit is contained in:
Charles Bochet
2025-01-10 20:54:10 +01:00
committed by GitHub
parent 2e0169b954
commit 5ec28afac9
5 changed files with 55 additions and 28 deletions

View File

@ -87,6 +87,7 @@ export const DisplayDefaultValueWithVariablesProperly: Story = {
args: {
placeholder: 'Enter valid json',
defaultValue: '{ "a": { "b" : {{var.test}} } }',
onPersist: fn(),
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
@ -120,6 +121,7 @@ export const InsertVariableInTheMiddleOnTextInput: Story = {
</button>
);
},
onPersist: fn(),
},
play: async ({ canvasElement, args }) => {
const canvas = within(canvasElement);
@ -161,6 +163,7 @@ export const CanUseVariableAsObjectProperty: Story = {
</button>
);
},
onPersist: fn(),
},
play: async ({ canvasElement, args }) => {
const canvas = within(canvasElement);
@ -188,6 +191,7 @@ export const ClearField: Story = {
args: {
placeholder: 'Enter valid json',
defaultValue: '{ "a": 2 }',
onPersist: fn(),
},
play: async ({ canvasElement, args }) => {
const defaultValueStringLength = args.defaultValue!.length;