[zanata/zanata-platform] 30b993: Activate storybook addons (ZNTA-2119) (#478)
GitHub
noreply at github.com
Wed Aug 16 14:04:03 UTC 2017
Branch: refs/heads/master
Home: https://github.com/zanata/zanata-platform
Commit: 30b993a7f6b380db6fa7cd6e654f44bfc6b09653
https://github.com/zanata/zanata-platform/commit/30b993a7f6b380db6fa7cd6e654f44bfc6b09653
Author: David Mason <drdmason at gmail.com>
Date: 2017-08-17 (Thu, 17 Aug 2017)
Changed paths:
A server/zanata-frontend/src/frontend/.storybook-editor/__snapshots__/storyshots-editor.test.js.snap
M server/zanata-frontend/src/frontend/.storybook-editor/addons.js
M server/zanata-frontend/src/frontend/.storybook-editor/config.js
A server/zanata-frontend/src/frontend/.storybook-editor/storyshots-editor.test.js
A server/zanata-frontend/src/frontend/.storybook-editor/storyshots-util.js
A server/zanata-frontend/src/frontend/.storybook-frontend/__snapshots__/storyshots-frontend.test.js.snap
M server/zanata-frontend/src/frontend/.storybook-frontend/config.js
A server/zanata-frontend/src/frontend/.storybook-frontend/storyshots-frontend.test.js
A server/zanata-frontend/src/frontend/__mocks__/cssMock.js
A server/zanata-frontend/src/frontend/__mocks__/mockAngularGettext.js
R server/zanata-frontend/src/frontend/__tests__/mock/cssMock.js
R server/zanata-frontend/src/frontend/__tests__/mock/mockAngularGettext.js
M server/zanata-frontend/src/frontend/app/components/Icon/Icon.story.js
M server/zanata-frontend/src/frontend/app/components/Modal/Modal.story.js
M server/zanata-frontend/src/frontend/app/components/Notification/Notification.story.js
M server/zanata-frontend/src/frontend/app/components/TriCheckbox/TriCheckbox.story.js
M server/zanata-frontend/src/frontend/app/editor/components/Button/Button.story.js
M server/zanata-frontend/src/frontend/app/editor/components/EditorSearchInput/index.js
M server/zanata-frontend/src/frontend/app/editor/components/GlossarySearchInput/GlossarySearchInput.story.js
M server/zanata-frontend/src/frontend/app/editor/components/GlossarySearchInput/index.js
M server/zanata-frontend/src/frontend/app/editor/components/GlossaryTerm/GlossaryTerm.story.js
M server/zanata-frontend/src/frontend/app/editor/components/Pager/Pager.test.js
M server/zanata-frontend/src/frontend/app/editor/components/TransUnitFilter/TransUnitFilter.test.js
A server/zanata-frontend/src/frontend/jest.config.js
R server/zanata-frontend/src/frontend/jest.config.json
M server/zanata-frontend/src/frontend/package.json
M server/zanata-frontend/src/frontend/yarn.lock
Log Message:
-----------
Activate storybook addons (ZNTA-2119) (#478)
This activates some storybook addons:
- host: allows sizing and positioning of the storybook container to better present the component
- info: shows story code, props details and optional notes
- knobs: allows changing story input values in a story
- storyshots: renders each storybook as a snapshot test, which produces a test failure when components render different markup.
Squashed merge of the following:
* chore(ZNTA-2119): add storybook info addon
Includes example usage on editor <Button> component.
* chore(ZNTA-2119): add storybook host addon
Host addon allows positioning the element and providing a specific
size of context to display the component in, as well as a few other
decorations.
* chore(ZNTA-2119): add storybook knobs addon
Includes a button builder story that demonstrates use of the knobs
addon.
* chore(ZNTA-2119): add storyshots
This required several changes to jest and storybook config to have
the storyshots tests execute without errors.
It also includes some cleanup in some of the storybooks and components
that were generating errors or warnings in tests.
* chore(ZNTA-2119): add initial component snapshots
Generated by storyshots.
Note that these are large files with snapshots for all the components
that have stories. This is not ideal, but there is a pull request in
progress for storyshots that will change this so that snapshots are
stored in the component directory, which will make more sense.
See: https://github.com/storybooks/storybook/pull/1584
* chore(ZNTA-2119): clean up jest mocks
* feat(ZNTA-2119): remove commented-out lines
* feat(ZNTA-2119): fix test failure due to missing TriCheckbox snapshots
Snapshots cannot be written in CI builds, so missing snapshots will fail tests.
More information about the zanata-commits
mailing list