diff --git a/packages/documentation-v7/cypress/snapshots/components/select.snapshot.ts b/packages/documentation-v7/cypress/snapshots/components/select.snapshot.ts new file mode 100644 index 0000000000..51939323b1 --- /dev/null +++ b/packages/documentation-v7/cypress/snapshots/components/select.snapshot.ts @@ -0,0 +1,6 @@ +describe('Select', () => { + it('default', () => { + cy.visit('./iframe.html?id=snapshots--select'); + cy.percySnapshot('Selects', { widths: [400] }); + }); +}); diff --git a/packages/documentation-v7/src/stories/components/select/select.snapshot.stories.ts b/packages/documentation-v7/src/stories/components/select/select.snapshot.stories.ts new file mode 100644 index 0000000000..ba4d60022e --- /dev/null +++ b/packages/documentation-v7/src/stories/components/select/select.snapshot.stories.ts @@ -0,0 +1,116 @@ +import type { Args, StoryContext, StoryObj } from '@storybook/web-components'; +import meta, { Default, FloatingLabel } from './select.stories'; +import { html } from 'lit'; +import { bombArgs } from '../../../utils/bombArgs'; + +export default { + ...meta, + title: 'Snapshots', +}; + +type Story = StoryObj; + +export const Select: Story = { + render: (_args: Args, context: StoryContext) => { + //Arguments for Default Version + const bombArgsGeneratedDefault = [ + ...bombArgs({ + label: [ + context.args.label, + 'Label - Lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor', + ], + hint: [''], + }), + ...bombArgs({ + hiddenLabel: [true], + hint: ['Hintus textus', context.args.hint], + }), + ...bombArgs({ + size: context.argTypes.size.options, + disabled: [false, true], + validation: context.argTypes.validation.options, + }), + ] + // remove disabled & validated examples + .filter((args: Args) => !(args.disabled && args.validation !== 'null')); + + //Arguments for Multiple Version + const bombArgsGeneratedMultiple = [ + ...bombArgs({ + multiple: [true], + label: [ + context.args.label, + 'Label - Lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor', + ], + hint: [''], + }), + ...bombArgs({ + multiple: [true], + hiddenLabel: [true], + hint: ['', 'Hintus textus', context.args.hint], + }), + ...bombArgs({ + multiple: [true], + size: context.argTypes.size.options, + disabled: [false, true], + validation: context.argTypes.validation.options, + }), + ] + // remove disabled & validated examples + .filter((args: Args) => !(args.disabled && args.validation !== 'null')); + + return html` +