-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
337f623
commit e086ced
Showing
4 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
packages/documentation/cypress/snapshots/foundation/layout/containers.snapshot.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
describe('Containers', () => { | ||
it('default', () => { | ||
cy.visit('/iframe.html?id=snapshots--containers'); | ||
cy.get('.container', { timeout: 30000 }).should('be.visible'); | ||
|
||
// takes a screenshot for each breakpoint | ||
cy.percySnapshot('Containers', { widths: [320, 720, 960, 1080, 1440] }); | ||
}); | ||
}); |
26 changes: 26 additions & 0 deletions
26
...ges/documentation/src/stories/foundation/layout/containers/containers.snapshot.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { Args, StoryContext, StoryObj } from '@storybook/web-components'; | ||
import meta from './containers.stories'; | ||
import { html } from 'lit'; | ||
import { StoryFn } from '@storybook/web-components'; | ||
|
||
const { id, ...metaWithoutId } = meta; | ||
|
||
export default { | ||
...metaWithoutId, | ||
title: 'Snapshots', | ||
}; | ||
|
||
type Story = StoryObj; | ||
|
||
export const Containers: Story = { | ||
render: (_args: Args, context: StoryContext) => { | ||
return html`${['container', 'container-fluid'].map(containerClass => | ||
meta.render({ containerClass }, context), | ||
)}`; | ||
}, | ||
decorators: [ | ||
(story: StoryFn, context: StoryContext) => html` | ||
<div class="container-snapshots">${story(context.args, context)}</div> | ||
`, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters