Skip to content

Commit 51dab56

Browse files
authored
feat(react): add hidden story for Pagination tooltip hover VRT (#22154)
* feat(react): add hidden story for Pagination tooltip hover VRT * fix: added delay for chromatic
1 parent 32de263 commit 51dab56

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

packages/react/src/components/Pagination/Pagination.stories.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Pagination from './Pagination';
99
import React from 'react';
1010
import { action } from 'storybook/actions';
1111
import mdx from './Pagination.mdx';
12+
import userEvent from '@testing-library/user-event';
1213

1314
const props = () => ({
1415
disabled: false,
@@ -150,6 +151,20 @@ Default.argTypes = {
150151
},
151152
};
152153

154+
export const TooltipHover = {
155+
...Default,
156+
tags: ['!autodocs', '!dev'],
157+
parameters: {
158+
chromatic: { delay: 100 },
159+
},
160+
play: async ({ canvasElement }) => {
161+
const nextButton = canvasElement.querySelector(
162+
'.cds--pagination__button--forward'
163+
);
164+
await userEvent.hover(nextButton);
165+
},
166+
};
167+
153168
export const MultiplePaginationComponents = (args) => {
154169
return (
155170
<div>

0 commit comments

Comments
 (0)