Skip to content

Commit

Permalink
chore: update eslint-plugin-testing-library to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuth committed Nov 13, 2023
1 parent ab53e15 commit c65a16e
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .storybook/pages/WireframeDemo/WireframeDemo.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export const WatchPage: StoryObj<Args> = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const nextPageButton = await canvas.findByText('Hogwarts');
userEvent.click(nextPageButton);
await userEvent.click(nextPageButton);
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-storybook": "^0.6.13",
"eslint-plugin-testing-library": "^5.11.1",
"eslint-plugin-testing-library": "^6.1.2",
"husky": "^8.0.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Breadcrumbs/Breadcrumbs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ export const LongTextMenu: StoryObj<Args> = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const dropdownMenuTrigger = await canvas.findByRole('button');
userEvent.click(dropdownMenuTrigger);
await userEvent.click(dropdownMenuTrigger);
},
};
2 changes: 1 addition & 1 deletion src/components/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,6 @@ export const InteractiveOnHover: StoryObj<Args> = {
const canvas = within(canvasElement);
const cardContents = await canvas.findByText('Card Contents');

userEvent.hover(cardContents);
await userEvent.hover(cardContents);
},
};
4 changes: 2 additions & 2 deletions src/components/FiltersDrawer/FiltersDrawer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const Default: StoryObj<Args> = {
if (isChromatic()) {
const canvas = within(canvasElement);
const filtersTrigger = await canvas.findByRole('button');
userEvent.click(filtersTrigger);
await userEvent.click(filtersTrigger);
}
},
};
Expand Down Expand Up @@ -233,7 +233,7 @@ export const OverflowInteractive: StoryObj<Args> = {
if (isChromatic()) {
const canvas = within(canvasElement);
const filtersTrigger = await canvas.findByRole('button');
userEvent.click(filtersTrigger);
await userEvent.click(filtersTrigger);
}
},
};
4 changes: 2 additions & 2 deletions src/components/FiltersPopover/FiltersPopover.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const Default: StoryObj<Args> = {
if (isChromatic()) {
const canvas = within(canvasElement);
const filtersTrigger = await canvas.findByRole('button');
userEvent.click(filtersTrigger);
await userEvent.click(filtersTrigger);
}
},
};
Expand Down Expand Up @@ -246,7 +246,7 @@ export const OverflowInteractive: StoryObj<Args> = {
if (isChromatic()) {
const canvas = within(canvasElement);
const filtersTrigger = await canvas.findByRole('button');
userEvent.click(filtersTrigger);
await userEvent.click(filtersTrigger);
}
},
};
6 changes: 3 additions & 3 deletions src/components/Menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ export const Opened: StoryObj<MenuProps> = {
// Sets the delay (in milliseconds) for a specific story.
chromatic: { delay: 300 },
},
play: () => {
userEvent.tab();
userEvent.keyboard(' ', { delay: 300 });
play: async () => {
await userEvent.tab();
await userEvent.keyboard(' ', { delay: 300 });
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Popover/Popover.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const Default: Story = {
if (isChromatic()) {
const canvas = within(canvasElement);
const filtersTrigger = await canvas.findByRole('button');
userEvent.click(filtersTrigger);
await userEvent.click(filtersTrigger);
}
},
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/Slider/Slider.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const Tooltip: Story = {
const canvas = within(canvasElement);
const slider = await canvas.findByRole('slider');

userEvent.hover(slider);
await userEvent.hover(slider);
}
},
};
Expand All @@ -177,8 +177,8 @@ export const Focus: Story = {
*/
snapshot: { skip: true },
},
play: () => {
userEvent.tab();
play: async () => {
await userEvent.tab();
},
};

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3057,7 +3057,7 @@ __metadata:
eslint-plugin-jest: "npm:^27.6.0"
eslint-plugin-prettier: "npm:^5.0.1"
eslint-plugin-storybook: "npm:^0.6.13"
eslint-plugin-testing-library: "npm:^5.11.1"
eslint-plugin-testing-library: "npm:^6.1.2"
graphemer: "npm:^1.4.0"
husky: "npm:^8.0.3"
identity-obj-proxy: "npm:^3.0.0"
Expand Down Expand Up @@ -11676,14 +11676,14 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-testing-library@npm:^5.11.1":
version: 5.11.1
resolution: "eslint-plugin-testing-library@npm:5.11.1"
"eslint-plugin-testing-library@npm:^6.1.2":
version: 6.1.2
resolution: "eslint-plugin-testing-library@npm:6.1.2"
dependencies:
"@typescript-eslint/utils": "npm:^5.58.0"
peerDependencies:
eslint: ^7.5.0 || ^8.0.0
checksum: 3b2f010b13fbffd9a2018815cdca7edfce64523d9263ed376b33bdc43fca297100dab755a40f5b8be0f8e76b44bc7883590acfa9016fbff20888d9ee67f964d0
checksum: 83399dae21422ca7e2ac99ff6666dffa64e31773132cb1854d00b29e8a6f6f167cc8f6f4e73112bef26a631d4c76e4b947aa6f7032d5c9cf1f7548de1f4b32bf
languageName: node
linkType: hard

Expand Down

0 comments on commit c65a16e

Please sign in to comment.