From 202154d05f984c80b3a48dd5dce60a141ad3a36c Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Thu, 17 Nov 2022 19:29:32 +0000 Subject: [PATCH] remove screen references --- .../react/my-component-play-function-composition.ts.mdx | 2 +- .../svelte/my-component-play-function-composition.js.mdx | 2 +- .../vue/my-component-play-function-composition.ts.mdx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/snippets/react/my-component-play-function-composition.ts.mdx b/docs/snippets/react/my-component-play-function-composition.ts.mdx index 4f07d3788f3a..027ea4d7050d 100644 --- a/docs/snippets/react/my-component-play-function-composition.ts.mdx +++ b/docs/snippets/react/my-component-play-function-composition.ts.mdx @@ -35,7 +35,7 @@ export const SecondStory: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await userEvent.type(screen.getByTestId('other-element'), 'another value'); + await userEvent.type(canvas.getByTestId('other-element'), 'another value'); }, }; diff --git a/docs/snippets/svelte/my-component-play-function-composition.js.mdx b/docs/snippets/svelte/my-component-play-function-composition.js.mdx index 254bb3672563..32e9abec9488 100644 --- a/docs/snippets/svelte/my-component-play-function-composition.js.mdx +++ b/docs/snippets/svelte/my-component-play-function-composition.js.mdx @@ -38,7 +38,7 @@ export const SecondStory = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await userEvent.type(screen.getByTestId('other-element'), 'another value'); + await userEvent.type(canvas.getByTestId('other-element'), 'another value'); }, }; diff --git a/docs/snippets/vue/my-component-play-function-composition.ts.mdx b/docs/snippets/vue/my-component-play-function-composition.ts.mdx index 980cbb0b8c38..cab65de51cef 100644 --- a/docs/snippets/vue/my-component-play-function-composition.ts.mdx +++ b/docs/snippets/vue/my-component-play-function-composition.ts.mdx @@ -32,7 +32,7 @@ export const FirstStory: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - userEvent.type(screen.getByTestId('an-element'), 'example-value'); + userEvent.type(canvas.getByTestId('an-element'), 'example-value'); }, }; @@ -44,7 +44,7 @@ export const SecondStory: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - await userEvent.type(screen.getByTestId('other-element'), 'another value'); + await userEvent.type(canvas.getByTestId('other-element'), 'another value'); }, };