From f1256e8331ba62c38903eb3c94a82bbaa7114e6b Mon Sep 17 00:00:00 2001 From: Thiyagaraj T <93907676+thiyagaraj-eightfold@users.noreply.github.com> Date: Fri, 22 Jul 2022 00:41:16 +0530 Subject: [PATCH] chore: optimise snapshot for storyshots (#250) --- src/__snapshots__/storybook.test.js.snap | 3 - .../__snapshots__/Accordion.stories.storyshot | 593 + .../__snapshots__/Avatar.stories.storyshot | 165 + .../__snapshots__/Badge.stories.storyshot | 28 + .../TwoStateButton.stories.storyshot | 93 + .../__snapshots__/Button.stories.storyshot | 485 + .../__snapshots__/CheckBox.stories.storyshot | 127 + .../ConfigProvider.stories.storyshot | 2994 + .../DatePicker.stories.storyshot | 3000 + .../__snapshots__/Dialog.stories.storyshot | 33 + .../__snapshots__/Dropdown.stories.storyshot | 105 + .../__snapshots__/Empty.stories.storyshot | 500 + .../Icon/__snapshots__/Icon.stories.storyshot | 120 + .../__snapshots__/InfoBar.stories.storyshot | 357 + .../__snapshots__/SearchBox.stories.storyshot | 149 + .../__snapshots__/TextArea.stories.storyshot | 110 + .../__snapshots__/TextInput.stories.storyshot | 146 + .../__snapshots__/Label.stories.storyshot | 60 + .../Link/__snapshots__/Link.stories.storyshot | 88 + .../List/__snapshots__/List.stories.storyshot | 241 + .../MatchScore.stories.storyshot | 54 + .../Menu/__snapshots__/Menu.stories.storyshot | 26 + .../__snapshots__/Modal.stories.storyshot | 113 + .../__snapshots__/Navbar.stories.storyshot | 113 + .../Pagination.stories.storyshot | 1247 + .../__snapshots__/Panel.stories.storyshot | 113 + .../PersistentBar.stories.storyshot | 623 + .../__snapshots__/Pills.stories.storyshot | 1289 + .../__snapshots__/Portal.stories.storyshot | 3 + .../RadioButton.stories.storyshot | 126 + .../__snapshots__/Select.stories.storyshot | 674 + .../__snapshots__/Slider.stories.storyshot | 169 + .../__snapshots__/Snackbar.stories.storyshot | 49 + .../__snapshots__/Spinner.stories.storyshot | 46 + .../__snapshots__/Stack.stories.storyshot | 345 + .../__snapshots__/Table.stories.storyshot | 49692 ++++++++++++++++ .../Tabs/__snapshots__/Tabs.stories.storyshot | 1193 + .../__snapshots__/Tooltip.stories.storyshot | 26 + src/storybook.test.js | 8 +- 39 files changed, 65301 insertions(+), 5 deletions(-) delete mode 100644 src/__snapshots__/storybook.test.js.snap create mode 100644 src/src/components/Accordion/__snapshots__/Accordion.stories.storyshot create mode 100644 src/src/components/Avatar/__snapshots__/Avatar.stories.storyshot create mode 100644 src/src/components/Badge/__snapshots__/Badge.stories.storyshot create mode 100644 src/src/components/Button/TwoStateButton/__snapshots__/TwoStateButton.stories.storyshot create mode 100644 src/src/components/Button/__snapshots__/Button.stories.storyshot create mode 100644 src/src/components/CheckBox/__snapshots__/CheckBox.stories.storyshot create mode 100644 src/src/components/ConfigProvider/__snapshots__/ConfigProvider.stories.storyshot create mode 100644 src/src/components/DateTimePicker/DatePicker/__snapshots__/DatePicker.stories.storyshot create mode 100644 src/src/components/Dialog/__snapshots__/Dialog.stories.storyshot create mode 100644 src/src/components/Dropdown/__snapshots__/Dropdown.stories.storyshot create mode 100644 src/src/components/Empty/__snapshots__/Empty.stories.storyshot create mode 100644 src/src/components/Icon/__snapshots__/Icon.stories.storyshot create mode 100644 src/src/components/InfoBar/__snapshots__/InfoBar.stories.storyshot create mode 100644 src/src/components/Inputs/SearchBox/__snapshots__/SearchBox.stories.storyshot create mode 100644 src/src/components/Inputs/TextArea/__snapshots__/TextArea.stories.storyshot create mode 100644 src/src/components/Inputs/TextInput/__snapshots__/TextInput.stories.storyshot create mode 100644 src/src/components/Label/__snapshots__/Label.stories.storyshot create mode 100644 src/src/components/Link/__snapshots__/Link.stories.storyshot create mode 100644 src/src/components/List/__snapshots__/List.stories.storyshot create mode 100644 src/src/components/MatchScore/__snapshots__/MatchScore.stories.storyshot create mode 100644 src/src/components/Menu/__snapshots__/Menu.stories.storyshot create mode 100644 src/src/components/Modal/__snapshots__/Modal.stories.storyshot create mode 100644 src/src/components/Navbar/__snapshots__/Navbar.stories.storyshot create mode 100644 src/src/components/Pagination/__snapshots__/Pagination.stories.storyshot create mode 100644 src/src/components/Panel/__snapshots__/Panel.stories.storyshot create mode 100644 src/src/components/PersistentBar/__snapshots__/PersistentBar.stories.storyshot create mode 100644 src/src/components/Pills/__snapshots__/Pills.stories.storyshot create mode 100644 src/src/components/Portal/__snapshots__/Portal.stories.storyshot create mode 100644 src/src/components/RadioButton/__snapshots__/RadioButton.stories.storyshot create mode 100644 src/src/components/Select/__snapshots__/Select.stories.storyshot create mode 100644 src/src/components/Slider/__snapshots__/Slider.stories.storyshot create mode 100644 src/src/components/Snackbar/__snapshots__/Snackbar.stories.storyshot create mode 100644 src/src/components/Spinner/__snapshots__/Spinner.stories.storyshot create mode 100644 src/src/components/Stack/__snapshots__/Stack.stories.storyshot create mode 100644 src/src/components/Table/__snapshots__/Table.stories.storyshot create mode 100644 src/src/components/Tabs/__snapshots__/Tabs.stories.storyshot create mode 100644 src/src/components/Tooltip/__snapshots__/Tooltip.stories.storyshot diff --git a/src/__snapshots__/storybook.test.js.snap b/src/__snapshots__/storybook.test.js.snap deleted file mode 100644 index 5d7f5e2a2..000000000 --- a/src/__snapshots__/storybook.test.js.snap +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d662117bb256b687f2c795efbf0f3a198b853ebdbecf4f0b55ded275bd90698d -size 1902477 diff --git a/src/src/components/Accordion/__snapshots__/Accordion.stories.storyshot b/src/src/components/Accordion/__snapshots__/Accordion.stories.storyshot new file mode 100644 index 000000000..97d6f8814 --- /dev/null +++ b/src/src/components/Accordion/__snapshots__/Accordion.stories.storyshot @@ -0,0 +1,593 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Accordion List Horizontal 1`] = ` +
+
+

+ Header +

+
+ +
+

+ Footer +

+
+
+`; + +exports[`Storyshots Accordion List Vertical 1`] = ` +
+
+

+ Header +

+
+ +
+

+ Footer +

+
+
+`; + +exports[`Storyshots Accordion Single 1`] = ` +
+
+ Accordion Header + + + + + +
+
+
+
+ Body 2 text used here. Bottom bars are sticky sections that can be used to highlight a few actions that are out of the view to be displayed inside the view. For example, if there's a very long form with Save and Cancel buttons at the bottom, we can use the bottom bar to show those two buttons in the view. We are making these bars to be flexible in height and also allowing any component to be added inside for now, to understand use cases from the team. +
+
+
+
+`; diff --git a/src/src/components/Avatar/__snapshots__/Avatar.stories.storyshot b/src/src/components/Avatar/__snapshots__/Avatar.stories.storyshot new file mode 100644 index 000000000..52611f09f --- /dev/null +++ b/src/src/components/Avatar/__snapshots__/Avatar.stories.storyshot @@ -0,0 +1,165 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Avatar Avatar Default 1`] = ` +
+ random profile image +
+`; + +exports[`Storyshots Avatar Avatar Fallback Hashing 1`] = ` +
+ HF +
+`; + +exports[`Storyshots Avatar Avatar Fallback Theme 1`] = ` +
+ AB +
+`; + +exports[`Storyshots Avatar Avatar Icon 1`] = ` +
+ + + + + +
+`; + +exports[`Storyshots Avatar Avatar Round 1`] = ` +
+ random profile image +
+`; + +exports[`Storyshots Avatar Avatar Round Icon 1`] = ` +
+ + + + + +
+`; diff --git a/src/src/components/Badge/__snapshots__/Badge.stories.storyshot b/src/src/components/Badge/__snapshots__/Badge.stories.storyshot new file mode 100644 index 000000000..1dca552b0 --- /dev/null +++ b/src/src/components/Badge/__snapshots__/Badge.stories.storyshot @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Badge Badge Active 1`] = ` + + 8 + +`; + +exports[`Storyshots Badge Badge Default 1`] = ` + + 8 + +`; + +exports[`Storyshots Badge Badge Disruptive 1`] = ` + + 8 + +`; diff --git a/src/src/components/Button/TwoStateButton/__snapshots__/TwoStateButton.stories.storyshot b/src/src/components/Button/TwoStateButton/__snapshots__/TwoStateButton.stories.storyshot new file mode 100644 index 000000000..609c2d2fe --- /dev/null +++ b/src/src/components/Button/TwoStateButton/__snapshots__/TwoStateButton.stories.storyshot @@ -0,0 +1,93 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Button Two State Button 1`] = ` + +`; diff --git a/src/src/components/Button/__snapshots__/Button.stories.storyshot b/src/src/components/Button/__snapshots__/Button.stories.storyshot new file mode 100644 index 000000000..add19abda --- /dev/null +++ b/src/src/components/Button/__snapshots__/Button.stories.storyshot @@ -0,0 +1,485 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Button Counter 1`] = ` + +`; + +exports[`Storyshots Button Default 1`] = ` + +`; + +exports[`Storyshots Button Neutral 1`] = ` + +`; + +exports[`Storyshots Button Primary 1`] = ` + +`; + +exports[`Storyshots Button Secondary 1`] = ` + +`; + +exports[`Storyshots Button Split 1`] = ` +Array [ + , + , +] +`; + +exports[`Storyshots Button Split With Counter 1`] = ` +Array [ + , + , +] +`; + +exports[`Storyshots Button Toggle 1`] = ` + +`; + +exports[`Storyshots Button Toggle With Counter 1`] = ` + +`; diff --git a/src/src/components/CheckBox/__snapshots__/CheckBox.stories.storyshot b/src/src/components/CheckBox/__snapshots__/CheckBox.stories.storyshot new file mode 100644 index 000000000..b3ceed525 --- /dev/null +++ b/src/src/components/CheckBox/__snapshots__/CheckBox.stories.storyshot @@ -0,0 +1,127 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Check Box Check Box 1`] = ` +
+ + +
+`; + +exports[`Storyshots Check Box Check Box Group 1`] = ` +
+
+ + +
+
+ + +
+
+ + +
+
+`; diff --git a/src/src/components/ConfigProvider/__snapshots__/ConfigProvider.stories.storyshot b/src/src/components/ConfigProvider/__snapshots__/ConfigProvider.stories.storyshot new file mode 100644 index 000000000..4702d8e66 --- /dev/null +++ b/src/src/components/ConfigProvider/__snapshots__/ConfigProvider.stories.storyshot @@ -0,0 +1,2994 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Config Provider Theming 1`] = ` +
+

+ Selected Theme: + + blue + +

+
+
+

+ Predefined +

+ +
+
+

+ Custom +

+
+
+
+
+
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+
+ + + + +
+
+ +
+
+
+
+
+
+

+ 3 + / + 5 +

+
+ + + + + + + + + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+`; diff --git a/src/src/components/DateTimePicker/DatePicker/__snapshots__/DatePicker.stories.storyshot b/src/src/components/DateTimePicker/DatePicker/__snapshots__/DatePicker.stories.storyshot new file mode 100644 index 000000000..2547d357e --- /dev/null +++ b/src/src/components/DateTimePicker/DatePicker/__snapshots__/DatePicker.stories.storyshot @@ -0,0 +1,3000 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Date Picker Customized Date Styling 1`] = ` +
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+`; + +exports[`Storyshots Date Picker Date Format Basic 1`] = ` +
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+`; + +exports[`Storyshots Date Picker Date Format Range 1`] = ` +
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + + + + + + + + +
+`; + +exports[`Storyshots Date Picker Extra Footer 1`] = ` +
+
+ + + + + + + + +
+
+`; + +exports[`Storyshots Date Picker Preset Ranges 1`] = ` +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+`; + +exports[`Storyshots Date Picker Range Picker 1`] = ` +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+`; + +exports[`Storyshots Date Picker Range Picker Choose Time 1`] = ` +
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+`; + +exports[`Storyshots Date Picker Range Picker Disabled 1`] = ` +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+`; + +exports[`Storyshots Date Picker Range Picker Disabled Date And Time 1`] = ` +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+
+`; + +exports[`Storyshots Date Picker Select Range By Day Limit 1`] = ` +
+
+ +
+
+ + + + + + + +
+
+ +
+
+ + + + + + + +
+`; + +exports[`Storyshots Date Picker Single Picker 1`] = ` +
+
+
+ + + + + + + + +
+
+
+
+ + + + + + + + +
+
+
+
+ + + + + + + + +
+
+
+
+ + + + + + + + +
+
+
+
+ + + + + + + + +
+
+
+`; + +exports[`Storyshots Date Picker Single Picker Choose Time 1`] = ` +
+
+ + + + + + + + +
+
+`; + +exports[`Storyshots Date Picker Single Picker Disabled 1`] = ` +
+
+
+ + + + + + + + +
+
+
+
+ + + + + + + + +
+
+
+`; + +exports[`Storyshots Date Picker Single Picker Disabled Date And Time 1`] = ` +
+
+
+ + + + + + + + +
+
+
+
+ + + + + + + + +
+
+
+`; + +exports[`Storyshots Date Picker Status 1`] = ` +
+
+
+ + + + + + + + +
+
+
+
+ + + + + + + + +
+
+
+`; diff --git a/src/src/components/Dialog/__snapshots__/Dialog.stories.storyshot b/src/src/components/Dialog/__snapshots__/Dialog.stories.storyshot new file mode 100644 index 000000000..2893ec9f5 --- /dev/null +++ b/src/src/components/Dialog/__snapshots__/Dialog.stories.storyshot @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Dialog Medium 1`] = ` + +`; + +exports[`Storyshots Dialog Small 1`] = ` + +`; diff --git a/src/src/components/Dropdown/__snapshots__/Dropdown.stories.storyshot b/src/src/components/Dropdown/__snapshots__/Dropdown.stories.storyshot new file mode 100644 index 000000000..6273dc128 --- /dev/null +++ b/src/src/components/Dropdown/__snapshots__/Dropdown.stories.storyshot @@ -0,0 +1,105 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Dropdown Dropdown Button 1`] = ` +
+ +
+`; + +exports[`Storyshots Dropdown Dropdown Div 1`] = ` +
+
+ + HTMLDivElement + + + + + + +
+
+`; diff --git a/src/src/components/Empty/__snapshots__/Empty.stories.storyshot b/src/src/components/Empty/__snapshots__/Empty.stories.storyshot new file mode 100644 index 000000000..aabc28c43 --- /dev/null +++ b/src/src/components/Empty/__snapshots__/Empty.stories.storyshot @@ -0,0 +1,500 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Empty Custom Image 1`] = ` +
+
+ + + + + +
+
+ Short Message Here +
+
+ More detail on how might the user be able to get around this +
+
+`; + +exports[`Storyshots Empty Empty Messages 1`] = ` +
+
+ + + + + + + +
+
+ Short Message Here +
+
+ More detail on how might the user be able to get around this +
+
+`; + +exports[`Storyshots Empty Error State 1`] = ` +
+
+ + + + + + + + + + + + + + + +
+
+ Short Message Here +
+
+ More detail on how might the user be able to get around this +
+
+`; + +exports[`Storyshots Empty No Data 1`] = ` +
+
+ + + + + + + + + +
+
+ Short Message Here +
+
+ More detail on how might the user be able to get around this +
+
+`; + +exports[`Storyshots Empty No Search Results 1`] = ` +
+
+ + + + + + + + + + + +
+
+ Short Message Here +
+
+ More detail on how might the user be able to get around this +
+
+`; + +exports[`Storyshots Empty Tasks Complete 1`] = ` +
+
+ + + + + + + + + + + + + + + +
+
+ Short Message Here +
+
+ More detail on how might the user be able to get around this +
+
+`; diff --git a/src/src/components/Icon/__snapshots__/Icon.stories.storyshot b/src/src/components/Icon/__snapshots__/Icon.stories.storyshot new file mode 100644 index 000000000..69c0e25c7 --- /dev/null +++ b/src/src/components/Icon/__snapshots__/Icon.stories.storyshot @@ -0,0 +1,120 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Icon Basic 1`] = ` + + + + My icon title. + + + My icon description. + + + + +`; + +exports[`Storyshots Icon Icomoon 1`] = ` + + + + + +`; + +exports[`Storyshots Icon Icomoon Multicolor 1`] = ` + + + + + + +`; diff --git a/src/src/components/InfoBar/__snapshots__/InfoBar.stories.storyshot b/src/src/components/InfoBar/__snapshots__/InfoBar.stories.storyshot new file mode 100644 index 000000000..58830578f --- /dev/null +++ b/src/src/components/InfoBar/__snapshots__/InfoBar.stories.storyshot @@ -0,0 +1,357 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Info Bar Disruptive 1`] = ` +
+ + + + + +
+ Body2 is used inside here. +
+ + +
+`; + +exports[`Storyshots Info Bar Neutral 1`] = ` +
+ + + + + +
+ Body2 is used inside here. +
+ + +
+`; + +exports[`Storyshots Info Bar Positive 1`] = ` +
+ + + + + +
+ Body2 is used inside here. +
+ + +
+`; + +exports[`Storyshots Info Bar Warning 1`] = ` +
+ + + + + +
+ Body2 is used inside here. +
+ + +
+`; diff --git a/src/src/components/Inputs/SearchBox/__snapshots__/SearchBox.stories.storyshot b/src/src/components/Inputs/SearchBox/__snapshots__/SearchBox.stories.storyshot new file mode 100644 index 000000000..c2ca1e741 --- /dev/null +++ b/src/src/components/Inputs/SearchBox/__snapshots__/SearchBox.stories.storyshot @@ -0,0 +1,149 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Input Search Box 1`] = ` +
+
+
+ + +
+ +
+
+
+
+ +
+ + + + + +
+ +
+
+
+`; diff --git a/src/src/components/Inputs/TextArea/__snapshots__/TextArea.stories.storyshot b/src/src/components/Inputs/TextArea/__snapshots__/TextArea.stories.storyshot new file mode 100644 index 000000000..8dba18b55 --- /dev/null +++ b/src/src/components/Inputs/TextArea/__snapshots__/TextArea.stories.storyshot @@ -0,0 +1,110 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Input Text Area 1`] = ` +
+
+ + +
+ +
+
+
+
+