Skip to content

Commit

Permalink
FIXUP
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Feb 27, 2022
1 parent c0008ef commit c898d9d
Show file tree
Hide file tree
Showing 43 changed files with 333,221 additions and 272,195 deletions.
43,610 changes: 43,610 additions & 0 deletions packages/ui/build/storybook/__snapshots__/storyshots.test.js.snap

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,86 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots Components/SummaryItem Loading 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots Components/SummaryItem Loading 1`] = `null`;

exports[`Storyshots Components/SummaryItem Show Delta False 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots Components/SummaryItem Show Delta False 1`] = `null`;

exports[`Storyshots Components/SummaryItem Show Metric Description 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots Components/SummaryItem Show Metric Description 1`] = `null`;

exports[`Storyshots Components/SummaryItem Size Large 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots Components/SummaryItem Size Large 1`] = `null`;

exports[`Storyshots Components/SummaryItem Standard 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots Components/SummaryItem Standard 1`] = `null`;
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots UI/HoverCard Default 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots UI/HoverCard Default 1`] = `null`;

exports[`Storyshots UI/HoverCard With Render Fn 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots UI/HoverCard With Render Fn 1`] = `null`;
Original file line number Diff line number Diff line change
@@ -1,52 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots UI/Icon All 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots UI/Icon All 1`] = `null`;

exports[`Storyshots UI/Icon Custom Size 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots UI/Icon Custom Size 1`] = `null`;

exports[`Storyshots UI/Icon Standard 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots UI/Icon Standard 1`] = `null`;
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots UI/Tag Default 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots UI/Tag Default 1`] = `null`;

exports[`Storyshots UI/Tag One Letter 1`] = `
<div>
<Component />
<IconSprite
height="16"
style={
Object {
"height": 0,
"position": "absolute",
"width": 0,
}
}
width="16"
/>
</div>
`;
exports[`Storyshots UI/Tag One Letter 1`] = `null`;
15 changes: 1 addition & 14 deletions packages/ui/build/storybook/storyshots.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from 'path';
import initStoryshots, { Stories2SnapsConverter } from '@storybook/addon-storyshots';
import { configure, mount, shallow } from 'enzyme';
import { configure, mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import toJson from 'enzyme-to-json';
import { advanceTo } from 'jest-date-mock';
Expand All @@ -10,19 +9,7 @@ advanceTo(new Date(2019, 0, 10));
configure({ adapter: new Adapter() });
const converter = new Stories2SnapsConverter();

const UI_PATTERN = new RegExp(path.join(__dirname, '../../src/ui'));

initStoryshots({
framework: 'react',
configPath: __dirname,
test: ({ story, context }) => {
const snapshotFileName = converter.getSnapshotFileName(context);
const storyElement = story.render();
const renderMethod = UI_PATTERN.test(snapshotFileName) ? mount : shallow;
const tree = renderMethod(storyElement);

if (snapshotFileName) {
expect(toJson(tree)).toMatchSpecificSnapshot(snapshotFileName);
}
},
});
Loading

0 comments on commit c898d9d

Please sign in to comment.