Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Moore committed Nov 28, 2024
1 parent c532c28 commit 80c9888
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,26 @@ export const InfoButtonLabel: Story = {
})
},
}

export const NoFocus: Story = {
play: async ({ canvasElement, step }) => {
const canvas = within(canvasElement)

await step("initial render complete", async () => {
await waitFor(() => {
canvas.getByRole("button", {
name: "View more information: Title",
})
})
})

await step("Can focus to button", async () => {
await waitFor(() => {
const buttonWithInfoLabel = canvas.getByRole("button", {
name: "View more information: Title",
})
expect(buttonWithInfoLabel).not.toHaveFocus()
})
})
},
}

0 comments on commit 80c9888

Please sign in to comment.