diff --git a/code/frameworks/angular/template/cli/Page.stories.ts b/code/frameworks/angular/template/cli/Page.stories.ts index 9d751ca18cb7..497bd8052f84 100644 --- a/code/frameworks/angular/template/cli/Page.stories.ts +++ b/code/frameworks/angular/template/cli/Page.stories.ts @@ -38,14 +38,14 @@ export const LoggedIn: Story = { }), play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/frameworks/nextjs/template/cli/js/Page.stories.js b/code/frameworks/nextjs/template/cli/js/Page.stories.js index 84ab959afa1d..0a7648b9cfff 100644 --- a/code/frameworks/nextjs/template/cli/js/Page.stories.js +++ b/code/frameworks/nextjs/template/cli/js/Page.stories.js @@ -16,14 +16,14 @@ export const LoggedOut = {}; export const LoggedIn = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/frameworks/nextjs/template/cli/ts-3-8/Page.stories.ts b/code/frameworks/nextjs/template/cli/ts-3-8/Page.stories.ts index 3f319abbf9b9..2b9a68ff66d6 100644 --- a/code/frameworks/nextjs/template/cli/ts-3-8/Page.stories.ts +++ b/code/frameworks/nextjs/template/cli/ts-3-8/Page.stories.ts @@ -21,14 +21,14 @@ export const LoggedOut: Story = {}; export const LoggedIn: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/frameworks/nextjs/template/cli/ts-4-9/Page.stories.ts b/code/frameworks/nextjs/template/cli/ts-4-9/Page.stories.ts index 307fc90db7c3..fd8facd04fdc 100644 --- a/code/frameworks/nextjs/template/cli/ts-4-9/Page.stories.ts +++ b/code/frameworks/nextjs/template/cli/ts-4-9/Page.stories.ts @@ -21,14 +21,14 @@ export const LoggedOut: Story = {}; export const LoggedIn: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/html/template/cli/js/Page.stories.js b/code/renderers/html/template/cli/js/Page.stories.js index 120f07681696..73a84bf127cc 100644 --- a/code/renderers/html/template/cli/js/Page.stories.js +++ b/code/renderers/html/template/cli/js/Page.stories.js @@ -16,14 +16,14 @@ export const LoggedOut = {}; export const LoggedIn = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/html/template/cli/ts-3-8/Page.stories.ts b/code/renderers/html/template/cli/ts-3-8/Page.stories.ts index ceacaf6c12c9..a33f0f42dd03 100644 --- a/code/renderers/html/template/cli/ts-3-8/Page.stories.ts +++ b/code/renderers/html/template/cli/ts-3-8/Page.stories.ts @@ -19,14 +19,14 @@ export const LoggedOut: StoryObj = {}; export const LoggedIn: StoryObj = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/html/template/cli/ts-4-9/Page.stories.ts b/code/renderers/html/template/cli/ts-4-9/Page.stories.ts index 436435bb69fe..57ce12297cbc 100644 --- a/code/renderers/html/template/cli/ts-4-9/Page.stories.ts +++ b/code/renderers/html/template/cli/ts-4-9/Page.stories.ts @@ -19,14 +19,14 @@ export const LoggedOut: StoryObj = {}; export const LoggedIn: StoryObj = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/preact/template/cli/Page.stories.jsx b/code/renderers/preact/template/cli/Page.stories.jsx index f5a5dd3c333f..6d9c52b0a6e1 100644 --- a/code/renderers/preact/template/cli/Page.stories.jsx +++ b/code/renderers/preact/template/cli/Page.stories.jsx @@ -17,14 +17,14 @@ export const LoggedOut = {}; export const LoggedIn = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/react/template/cli/js/Page.stories.js b/code/renderers/react/template/cli/js/Page.stories.js index f839ec1ada96..4bb0393feebe 100644 --- a/code/renderers/react/template/cli/js/Page.stories.js +++ b/code/renderers/react/template/cli/js/Page.stories.js @@ -17,14 +17,14 @@ export const LoggedOut = {}; export const LoggedIn = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/react/template/cli/ts-3-8/Page.stories.ts b/code/renderers/react/template/cli/ts-3-8/Page.stories.ts index 7bf85faefe95..ace70e3a8a60 100644 --- a/code/renderers/react/template/cli/ts-3-8/Page.stories.ts +++ b/code/renderers/react/template/cli/ts-3-8/Page.stories.ts @@ -21,14 +21,14 @@ export const LoggedOut: Story = {}; export const LoggedIn: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/react/template/cli/ts-4-9/Page.stories.ts b/code/renderers/react/template/cli/ts-4-9/Page.stories.ts index 307fc90db7c3..fd8facd04fdc 100644 --- a/code/renderers/react/template/cli/ts-4-9/Page.stories.ts +++ b/code/renderers/react/template/cli/ts-4-9/Page.stories.ts @@ -21,14 +21,14 @@ export const LoggedOut: Story = {}; export const LoggedIn: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/svelte/template/cli/js/Page.stories.js b/code/renderers/svelte/template/cli/js/Page.stories.js index d72b78c5ce9e..67b13d887ddb 100644 --- a/code/renderers/svelte/template/cli/js/Page.stories.js +++ b/code/renderers/svelte/template/cli/js/Page.stories.js @@ -17,14 +17,14 @@ export const LoggedOut = {}; export const LoggedIn = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/svelte/template/cli/ts-3-8/Page.stories.ts b/code/renderers/svelte/template/cli/ts-3-8/Page.stories.ts index 6596fe91c6e7..e8f70551c573 100644 --- a/code/renderers/svelte/template/cli/ts-3-8/Page.stories.ts +++ b/code/renderers/svelte/template/cli/ts-3-8/Page.stories.ts @@ -21,14 +21,14 @@ export const LoggedOut: Story = {}; export const LoggedIn: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/svelte/template/cli/ts-4-9/Page.stories.ts b/code/renderers/svelte/template/cli/ts-4-9/Page.stories.ts index 434e0f19865a..8d38e4dfc284 100644 --- a/code/renderers/svelte/template/cli/ts-4-9/Page.stories.ts +++ b/code/renderers/svelte/template/cli/ts-4-9/Page.stories.ts @@ -21,14 +21,14 @@ export const LoggedOut: Story = {}; export const LoggedIn: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/vue/template/cli/Page.stories.js b/code/renderers/vue/template/cli/Page.stories.js index 9dbb953e19ee..656b562859de 100644 --- a/code/renderers/vue/template/cli/Page.stories.js +++ b/code/renderers/vue/template/cli/Page.stories.js @@ -19,14 +19,14 @@ export const LoggedOut = {}; export const LoggedIn = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/vue3/template/cli/js/Page.stories.js b/code/renderers/vue3/template/cli/js/Page.stories.js index bb8d599f5ab8..2a84357b2b0b 100644 --- a/code/renderers/vue3/template/cli/js/Page.stories.js +++ b/code/renderers/vue3/template/cli/js/Page.stories.js @@ -22,14 +22,14 @@ export const LoggedIn = { }), play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/vue3/template/cli/ts-3-8/Page.stories.ts b/code/renderers/vue3/template/cli/ts-3-8/Page.stories.ts index 6302490699ae..94c9dfa755a3 100644 --- a/code/renderers/vue3/template/cli/ts-3-8/Page.stories.ts +++ b/code/renderers/vue3/template/cli/ts-3-8/Page.stories.ts @@ -24,14 +24,14 @@ type Story = StoryObj; export const LoggedIn: Story = { play: async ({ canvasElement }: any) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument(); diff --git a/code/renderers/vue3/template/cli/ts-4-9/Page.stories.ts b/code/renderers/vue3/template/cli/ts-4-9/Page.stories.ts index e72ad9467508..61685e156666 100644 --- a/code/renderers/vue3/template/cli/ts-4-9/Page.stories.ts +++ b/code/renderers/vue3/template/cli/ts-4-9/Page.stories.ts @@ -24,14 +24,14 @@ type Story = StoryObj; export const LoggedIn: Story = { play: async ({ canvasElement }: any) => { const canvas = within(canvasElement); - const loginButton = await canvas.getByRole('button', { + const loginButton = canvas.getByRole('button', { name: /Log in/i, }); await expect(loginButton).toBeInTheDocument(); await userEvent.click(loginButton); await expect(loginButton).not.toBeInTheDocument(); - const logoutButton = await canvas.getByRole('button', { + const logoutButton = canvas.getByRole('button', { name: /Log out/i, }); await expect(logoutButton).toBeInTheDocument();