Skip to content

Commit

Permalink
fix - use findByRole instead of getByRole
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangohjw committed Nov 18, 2024
1 parent edb01c8 commit 4c80133
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/studio/src/stories/Page/Search.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const Initial: Story = {
play: async ({ canvasElement }) => {
await waitFor(async () => {
const screen = within(canvasElement)
const searchButton = screen.getByRole("button", {
const searchButton = await screen.findByRole("button", {
name: "search-button",
})
await userEvent.click(searchButton)
Expand All @@ -65,7 +65,7 @@ export const Results: Story = {
play: async ({ canvasElement }) => {
await waitFor(async () => {
const screen = within(canvasElement)
const searchButton = screen.getByRole("button", {
const searchButton = await screen.findByRole("button", {
name: "search-button",
})
await userEvent.click(searchButton)
Expand All @@ -83,7 +83,7 @@ export const Loading: Story = {
play: async ({ canvasElement }) => {
await waitFor(async () => {
const screen = within(canvasElement)
const searchButton = screen.getByRole("button", {
const searchButton = await screen.findByRole("button", {
name: "search-button",
})
await userEvent.click(searchButton)
Expand All @@ -101,7 +101,7 @@ export const NoResults: Story = {
play: async ({ canvasElement }) => {
await waitFor(async () => {
const screen = within(canvasElement)
const searchButton = screen.getByRole("button", {
const searchButton = await screen.findByRole("button", {
name: "search-button",
})
await userEvent.click(searchButton)
Expand Down

0 comments on commit 4c80133

Please sign in to comment.