Update docs

This commit is contained in:
Kasper Peulen 2024-06-26 12:50:08 +02:00
parent 054f661b12
commit 156966b51d

View File

@ -33,12 +33,12 @@ export const SecondStory: Story = {
};
export const CombinedStories: Story = {
play: async ({ canvasElement }) => {
play: async ({ context, canvasElement }) => {
const canvas = within(canvasElement);
// Runs the FirstStory and Second story play function before running this story's play function
await FirstStory.play({ canvasElement });
await SecondStory.play({ canvasElement });
await FirstStory.play(context);
await SecondStory.play(context);
await userEvent.type(canvas.getByTestId('another-element'), 'random value');
},
};
@ -74,8 +74,8 @@ export const SecondStory = {
};
export const CombinedStories = {
play: async (context) => {
const canvas = within(context.canvasElement);
play: async ({ context, canvasElement }) => {
const canvas = within(canvasElement);
// Runs the FirstStory and Second story play function before running this story's play function
await FirstStory.play(context);
@ -121,12 +121,12 @@ export const SecondStory: Story = {
};
export const CombinedStories: Story = {
play: async ({ canvasElement }) => {
play: async ({ context, canvasElement }) => {
const canvas = within(canvasElement);
// Runs the FirstStory and Second story play function before running this story's play function
await FirstStory.play({ canvasElement });
await SecondStory.play({ canvasElement });
await FirstStory.play(context);
await SecondStory.play(context);
await userEvent.type(canvas.getByTestId('another-element'), 'random value');
},
};
@ -168,7 +168,7 @@ export const SecondStory: Story = {
};
export const CombinedStories: Story = {
play: async (context) => {
play: async ({ context, canvasElement }) => {
const canvas = within(context.canvasElement);
// Runs the FirstStory and Second story play function before running this story's play function
@ -207,8 +207,8 @@ export const SecondStory = {
};
export const CombinedStories = {
play: async (context) => {
const canvas = within(context.canvasElement);
play: async ({ context, canvasElement }) => {
const canvas = within(canvasElement);
// Runs the FirstStory and Second story play function before running this story's play function
await FirstStory.play(context);
@ -250,8 +250,8 @@ export const SecondStory: Story = {
};
export const CombinedStories: Story = {
play: async (context) => {
const canvas = within(context.canvasElement);
play: async ({ context, canvasElement }) => {
const canvas = within(canvasElement);
// Runs the FirstStory and Second story play function before running this story's play function
await FirstStory.play(context);