Skip to content

Commit

Permalink
ci(chromatic): limit viewport size to not reach the pixels limit
Browse files Browse the repository at this point in the history
  • Loading branch information
100terres committed Mar 20, 2022
1 parent de6e21f commit c1fc084
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
8 changes: 7 additions & 1 deletion stories/1-single-vertical-list.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ const Title = styled.h4`

storiesOf('single vertical list', module)
.add('basic', () => <QuoteApp initial={data.small} />)
.add('large data set', () => <QuoteApp initial={data.large} />)
.add('large data set', () => <QuoteApp initial={data.large} />, {
chromatic: {
// This is to make sure we do not reach
// the 25,000,000px limit of the snapshot.
viewports: [320],
},
})
.add('Droppable is a scroll container', () => (
<QuoteApp
initial={data.medium}
Expand Down
14 changes: 11 additions & 3 deletions stories/45-virtual.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ storiesOf('Virtual: react-window', module)
storiesOf('Virtual: react-virtualized', module)
.add('list', () => <ReactVirtualizedList initial={getQuotes(1000)} />)
.add('board', () => <ReactVirtualizedBoard />)
.add('window list', () => (
<ReactVirtualizedWindowList initial={getQuotes(1000)} />
));
.add(
'window list',
() => <ReactVirtualizedWindowList initial={getQuotes(700)} />,
{
chromatic: {
// This is to make sure we do not reach
// the 25,000,000px limit of the snapshot.
viewports: [320],
},
},
);

0 comments on commit c1fc084

Please sign in to comment.