UNPKG

@orfeas126/box-ui-elements

Version:
41 lines 1.02 kB
import { expect, userEvent, within } from '@storybook/test'; import ContentSidebar from '../../ContentSidebar'; const mockFeatures = { 'boxai.sidebar.enabled': true }; export default { title: 'Elements/ContentSidebar/BoxAISidebar/tests/visual-regression-tests', component: ContentSidebar, args: { features: mockFeatures, fileId: global.FILE_ID, token: global.TOKEN } }; export const BoxAIInSidebar = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); const sidebar = await canvas.findByRole('heading', { name: 'Box AI' }, { timeout: 5000 }); expect(sidebar).toBeInTheDocument(); } }; export const BoxAIWithExpandedView = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); const expandButton = await canvas.findByRole('button', { name: 'Expand' }, { timeout: 5000 }); await userEvent.click(expandButton); } }; //# sourceMappingURL=BoxAISidebar-visual.stories.js.map