From a9d6e619451f248c9d12eae3edd405d974e75243 Mon Sep 17 00:00:00 2001 From: Jon Q Date: Mon, 13 Jan 2020 14:50:16 -0500 Subject: [PATCH] Update Storyshots for testing --- storybook/test/__snapshots__/index.js.snap | 285 +++++++++++---------- storybook/test/index.js | 4 +- 2 files changed, 145 insertions(+), 144 deletions(-) diff --git a/storybook/test/__snapshots__/index.js.snap b/storybook/test/__snapshots__/index.js.snap index eef58a88e9ec1..249b86d7dcd9d 100644 --- a/storybook/test/__snapshots__/index.js.snap +++ b/storybook/test/__snapshots__/index.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Storyshots Components|Animate Appear Bottom Left 1`] = ` +exports[`Storyshots Components/Animate Appear Bottom Left 1`] = `
@@ -37,7 +37,7 @@ exports[`Storyshots Components|Animate Appear Bottom Left 1`] = `
`; -exports[`Storyshots Components|Animate Appear Bottom Right 1`] = ` +exports[`Storyshots Components/Animate Appear Bottom Right 1`] = `
@@ -74,7 +74,7 @@ exports[`Storyshots Components|Animate Appear Bottom Right 1`] = `
`; -exports[`Storyshots Components|Animate Appear Top Left 1`] = ` +exports[`Storyshots Components/Animate Appear Top Left 1`] = `
@@ -111,7 +111,7 @@ exports[`Storyshots Components|Animate Appear Top Left 1`] = `
`; -exports[`Storyshots Components|Animate Appear Top Right 1`] = ` +exports[`Storyshots Components/Animate Appear Top Right 1`] = `
@@ -148,7 +148,7 @@ exports[`Storyshots Components|Animate Appear Top Right 1`] = `
`; -exports[`Storyshots Components|Animate Default 1`] = ` +exports[`Storyshots Components/Animate Default 1`] = `
@@ -183,7 +183,7 @@ exports[`Storyshots Components|Animate Default 1`] = `
`; -exports[`Storyshots Components|Animate Loading 1`] = ` +exports[`Storyshots Components/Animate Loading 1`] = `
@@ -218,7 +218,7 @@ exports[`Storyshots Components|Animate Loading 1`] = `
`; -exports[`Storyshots Components|Animate Slide In 1`] = ` +exports[`Storyshots Components/Animate Slide In 1`] = `
@@ -253,7 +253,7 @@ exports[`Storyshots Components|Animate Slide In 1`] = `
`; -exports[`Storyshots Components|BaseControl Default 1`] = ` +exports[`Storyshots Components/BaseControl Default 1`] = `
@@ -279,7 +279,7 @@ exports[`Storyshots Components|BaseControl Default 1`] = `
`; -exports[`Storyshots Components|Button Buttons 1`] = ` +exports[`Storyshots Components/Button Buttons 1`] = `
`; -exports[`Storyshots Components|Button Default 1`] = ` +exports[`Storyshots Components/Button Default 1`] = `
`; -exports[`Storyshots Components|Card/Divider Default 1`] = ` +exports[`Storyshots Components/Card/Divider Default 1`] = ` .emotion-6 { background: #fff; box-sizing: border-box; @@ -1087,7 +1087,7 @@ exports[`Storyshots Components|Card/Divider Default 1`] = ` `; -exports[`Storyshots Components|Card/Footer Default 1`] = ` +exports[`Storyshots Components/Card/Footer Default 1`] = ` .emotion-2 { background: #fff; box-sizing: border-box; @@ -1154,7 +1154,7 @@ exports[`Storyshots Components|Card/Footer Default 1`] = ` `; -exports[`Storyshots Components|Card/Header Default 1`] = ` +exports[`Storyshots Components/Card/Header Default 1`] = ` .emotion-2 { background: #fff; box-sizing: border-box; @@ -1221,7 +1221,7 @@ exports[`Storyshots Components|Card/Header Default 1`] = ` `; -exports[`Storyshots Components|Card/Media Default 1`] = ` +exports[`Storyshots Components/Card/Media Default 1`] = ` .emotion-4 { background: #fff; box-sizing: border-box; @@ -1308,7 +1308,7 @@ exports[`Storyshots Components|Card/Media Default 1`] = ` `; -exports[`Storyshots Components|Card/Media Header And Footer 1`] = ` +exports[`Storyshots Components/Card/Media Header And Footer 1`] = ` .emotion-6 { background: #fff; box-sizing: border-box; @@ -1446,7 +1446,7 @@ exports[`Storyshots Components|Card/Media Header And Footer 1`] = ` `; -exports[`Storyshots Components|Card/Media Horizontally Aligned 1`] = ` +exports[`Storyshots Components/Card/Media Horizontally Aligned 1`] = ` Array [

Note: This story demonstrates how this UI may be created. It requires extra styling. @@ -1562,7 +1562,7 @@ Array [ ] `; -exports[`Storyshots Components|Card/Media Iframe Embed 1`] = ` +exports[`Storyshots Components/Card/Media Iframe Embed 1`] = ` .emotion-4 { background: #fff; box-sizing: border-box; @@ -1665,7 +1665,7 @@ exports[`Storyshots Components|Card/Media Iframe Embed 1`] = ` `; -exports[`Storyshots Components|Card/Media On Bottom 1`] = ` +exports[`Storyshots Components/Card/Media On Bottom 1`] = ` .emotion-4 { background: #fff; box-sizing: border-box; @@ -1752,7 +1752,7 @@ exports[`Storyshots Components|Card/Media On Bottom 1`] = ` `; -exports[`Storyshots Components|Card/Media On Top 1`] = ` +exports[`Storyshots Components/Card/Media On Top 1`] = ` .emotion-4 { background: #fff; box-sizing: border-box; @@ -1841,7 +1841,7 @@ exports[`Storyshots Components|Card/Media On Top 1`] = ` `; -exports[`Storyshots Components|CheckboxControl All 1`] = ` +exports[`Storyshots Components/CheckboxControl All 1`] = `

@@ -1897,7 +1897,7 @@ exports[`Storyshots Components|CheckboxControl All 1`] = `
`; -exports[`Storyshots Components|CheckboxControl Default 1`] = ` +exports[`Storyshots Components/CheckboxControl Default 1`] = `
@@ -1940,7 +1940,7 @@ exports[`Storyshots Components|CheckboxControl Default 1`] = `
`; -exports[`Storyshots Components|ClipboardButton Default 1`] = ` +exports[`Storyshots Components/ClipboardButton Default 1`] = ` @@ -1953,7 +1953,7 @@ exports[`Storyshots Components|ClipboardButton Default 1`] = ` `; -exports[`Storyshots Components|ColorIndicator Default 1`] = ` +exports[`Storyshots Components/ColorIndicator Default 1`] = ` `; -exports[`Storyshots Components|ColorPalette Default 1`] = ` +exports[`Storyshots Components/ColorPalette Default 1`] = `
@@ -2058,7 +2058,7 @@ exports[`Storyshots Components|ColorPalette Default 1`] = `
`; -exports[`Storyshots Components|ColorPalette With Knobs 1`] = ` +exports[`Storyshots Components/ColorPalette With Knobs 1`] = `
@@ -2152,7 +2152,7 @@ exports[`Storyshots Components|ColorPalette With Knobs 1`] = `
`; -exports[`Storyshots Components|ColorPicker Alpha Enabled 1`] = ` +exports[`Storyshots Components/ColorPicker Alpha Enabled 1`] = `
@@ -2364,7 +2364,7 @@ exports[`Storyshots Components|ColorPicker Alpha Enabled 1`] = `
`; -exports[`Storyshots Components|ColorPicker Default 1`] = ` +exports[`Storyshots Components/ColorPicker Default 1`] = `
@@ -2539,7 +2539,56 @@ exports[`Storyshots Components|ColorPicker Default 1`] = `
`; -exports[`Storyshots Components|Dashicon Default 1`] = ` +exports[`Storyshots Components/CustomSelectControl Default 1`] = ` +
+ + +
    +
+`; + +exports[`Storyshots Components/Dashicon Default 1`] = `

Is Dragging? @@ -2605,7 +2654,7 @@ exports[`Storyshots Components|Draggable Default 1`] = `

`; -exports[`Storyshots Components|Dropdown Default 1`] = ` +exports[`Storyshots Components/Dropdown Default 1`] = ` Array [

@@ -2684,7 +2733,7 @@ Array [ ] `; -exports[`Storyshots Components|Experimental/Text Body 1`] = ` +exports[`Storyshots Components/Experimental/Text Body 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2700,7 +2749,7 @@ exports[`Storyshots Components|Experimental/Text Body 1`] = `

`; -exports[`Storyshots Components|Experimental/Text Body Small 1`] = ` +exports[`Storyshots Components/Experimental/Text Body Small 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2716,7 +2765,7 @@ exports[`Storyshots Components|Experimental/Text Body Small 1`] = `

`; -exports[`Storyshots Components|Experimental/Text Button 1`] = ` +exports[`Storyshots Components/Experimental/Text Button 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2732,7 +2781,7 @@ exports[`Storyshots Components|Experimental/Text Button 1`] = `

`; -exports[`Storyshots Components|Experimental/Text Caption 1`] = ` +exports[`Storyshots Components/Experimental/Text Caption 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2748,7 +2797,7 @@ exports[`Storyshots Components|Experimental/Text Caption 1`] = `

`; -exports[`Storyshots Components|Experimental/Text Default 1`] = ` +exports[`Storyshots Components/Experimental/Text Default 1`] = ` Array [ .emotion-0 { margin: 0; @@ -2887,7 +2936,7 @@ Array [ ] `; -exports[`Storyshots Components|Experimental/Text Label 1`] = ` +exports[`Storyshots Components/Experimental/Text Label 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2903,7 +2952,7 @@ exports[`Storyshots Components|Experimental/Text Label 1`] = `

`; -exports[`Storyshots Components|Experimental/Text Subtitle 1`] = ` +exports[`Storyshots Components/Experimental/Text Subtitle 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2921,7 +2970,7 @@ exports[`Storyshots Components|Experimental/Text Subtitle 1`] = `

`; -exports[`Storyshots Components|Experimental/Text Subtitle Small 1`] = ` +exports[`Storyshots Components/Experimental/Text Subtitle Small 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2939,7 +2988,7 @@ exports[`Storyshots Components|Experimental/Text Subtitle Small 1`] = `

`; -exports[`Storyshots Components|Experimental/Text Title Large 1`] = ` +exports[`Storyshots Components/Experimental/Text Title Large 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2955,7 +3004,7 @@ exports[`Storyshots Components|Experimental/Text Title Large 1`] = ` `; -exports[`Storyshots Components|Experimental/Text Title Medium 1`] = ` +exports[`Storyshots Components/Experimental/Text Title Medium 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2971,7 +3020,7 @@ exports[`Storyshots Components|Experimental/Text Title Medium 1`] = ` `; -exports[`Storyshots Components|Experimental/Text Title Small 1`] = ` +exports[`Storyshots Components/Experimental/Text Title Small 1`] = ` .emotion-0 { margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; @@ -2987,7 +3036,7 @@ exports[`Storyshots Components|Experimental/Text Title Small 1`] = ` `; -exports[`Storyshots Components|ExternalLink Default 1`] = ` +exports[`Storyshots Components/ExternalLink Default 1`] = `
`; -exports[`Storyshots Components|FontSizePicker Default 1`] = ` +exports[`Storyshots Components/FontSizePicker Default 1`] = `
@@ -3105,7 +3154,7 @@ exports[`Storyshots Components|FontSizePicker Default 1`] = `
`; -exports[`Storyshots Components|FontSizePicker With Slider 1`] = ` +exports[`Storyshots Components/FontSizePicker With Slider 1`] = `
@@ -3237,7 +3286,7 @@ exports[`Storyshots Components|FontSizePicker With Slider 1`] = `
`; -exports[`Storyshots Components|FontSizePicker Without Custom Sizes 1`] = ` +exports[`Storyshots Components/FontSizePicker Without Custom Sizes 1`] = `
@@ -3308,7 +3357,7 @@ exports[`Storyshots Components|FontSizePicker Without Custom Sizes 1`] = `
`; -exports[`Storyshots Components|Guide Default 1`] = ` +exports[`Storyshots Components/Guide Default 1`] = ` -
    -
-`; diff --git a/storybook/test/index.js b/storybook/test/index.js index 3702a12325a17..3ea7f14605e0f 100644 --- a/storybook/test/index.js +++ b/storybook/test/index.js @@ -13,12 +13,12 @@ initStoryshots( { createNodeMock: ( element ) => { const currentElement = element.type && document.createElement( element.type ); - if ( story.kind === 'Components|ClipboardButton' ) { + if ( story.kind === 'Components/ClipboardButton' ) { currentElement.appendChild( document.createElement( 'button' ) ); } - if ( story.kind === 'Components|Popover' ) { + if ( story.kind === 'Components/Popover' ) { const parentElement = document.createElement( 'div' ); parentElement.appendChild( currentElement ); }