Skip to content

Commit 6fd1da6

Browse files
committed
clean up story
1 parent 812c3f5 commit 6fd1da6

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

app/components/Input/Base.stories.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Meta, StoryObj } from '@nuxtjs/storybook'
2-
import { expect, fn, userEvent, within } from 'storybook/test'
2+
import { expect, fn, userEvent } from 'storybook/test'
33
import Component from './Base.vue'
44

55
const meta = {
@@ -48,8 +48,7 @@ export const Event: Story = {
4848
onFocus: fn(),
4949
onBlur: fn(),
5050
},
51-
play: async ({ args, canvasElement }) => {
52-
const canvas = within(canvasElement)
51+
play: async ({ args, canvas }) => {
5352
const input = canvas.getByRole('textbox')
5453

5554
await userEvent.click(input)
@@ -62,13 +61,10 @@ export const Event: Story = {
6261

6362
export const Disable: Story = {
6463
args: { disabled: true },
65-
play: async ({ args, canvasElement }) => {
66-
const canvas = within(canvasElement)
64+
play: async ({ canvas }) => {
6765
const input = canvas.getByRole('textbox')
6866

6967
await expect(input).toBeDisabled()
70-
await userEvent.click(input)
71-
await expect(args.onFocus).not.toHaveBeenCalled()
7268
},
7369
}
7470

0 commit comments

Comments
 (0)