Merge branch 'master' into master

This commit is contained in:
Filipp Riabchun 2017-09-30 11:48:58 -07:00 committed by GitHub
commit d62d568264
34 changed files with 708 additions and 661 deletions

View File

@ -24,14 +24,14 @@
"@storybook/addons": "^3.2.10",
"deep-equal": "^1.0.1",
"json-stringify-safe": "^5.0.1",
"prop-types": "^15.5.10",
"react-inspector": "^2.1.6",
"prop-types": "^15.6.0",
"react-inspector": "^2.2.0",
"uuid": "^3.1.0"
},
"devDependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"shelljs": "^0.7.8"
},
"peerDependencies": {

View File

@ -24,14 +24,14 @@
},
"dependencies": {
"@storybook/addons": "^3.2.10",
"babel-runtime": "^6.23.0",
"babel-runtime": "^6.26.0",
"deep-equal": "^1.0.1",
"events": "^1.1.1",
"global": "^4.3.2",
"insert-css": "^1.0.0",
"marked": "^0.3.6",
"moment": "^2.18.1",
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"react-render-html": "^0.1.6",
"react-textarea-autosize": "^4.3.0"
},
@ -41,9 +41,9 @@
"@storybook/addon-actions": "^3.2.11",
"@storybook/react": "^3.2.11",
"git-url-parse": "^6.2.2",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"shelljs": "^0.7.8"
},
"peerDependencies": {

View File

@ -21,15 +21,15 @@
},
"dependencies": {
"@storybook/addons": "^3.2.10",
"babel-runtime": "^6.23.0",
"babel-runtime": "^6.26.0",
"format-json": "^1.0.3",
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"react-textarea-autosize": "^4.3.0",
"uuid": "^3.1.0"
},
"devDependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1"
"react": "^16.0.0",
"react-dom": "^16.0.0"
},
"peerDependencies": {
"react": "*"

View File

@ -8,7 +8,7 @@
"license": "MIT",
"dependencies": {
"cors": "^2.8.0",
"express": "^4.14.0",
"express": "^4.15.5",
"express-graphql": "^0.5.4",
"graphql": "^0.7.0"
}

View File

@ -24,11 +24,11 @@
"global": "^4.3.2",
"graphiql": "^0.7.8",
"graphql": "^0.7.0",
"prop-types": "^15.5.10"
"prop-types": "^15.6.0"
},
"devDependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"shelljs": "^0.7.8"
},
"peerDependencies": {

View File

@ -16,18 +16,18 @@
"dependencies": {
"@storybook/addons": "^3.2.10",
"@storybook/components": "^3.2.10",
"babel-runtime": "^6.23.0",
"babel-runtime": "^6.26.0",
"global": "^4.3.2",
"marksy": "^2.0.0",
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"react-addons-create-fragment": "^15.5.3",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"git-url-parse": "^6.2.2",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1"
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0"
},
"peerDependencies": {
"react": "*"

View File

@ -110,7 +110,7 @@ export default function PropVal(props) {
if (!braceWrap) return content;
return <span>{content}</span>;
return <span>&#123;{content}&#125;</span>;
}
PropVal.defaultProps = {

View File

@ -15,13 +15,13 @@
},
"dependencies": {
"@storybook/addons": "^3.2.10",
"babel-runtime": "^6.23.0",
"babel-runtime": "^6.26.0",
"deep-equal": "^1.0.1",
"global": "^4.3.2",
"insert-css": "^1.0.0",
"lodash.debounce": "^4.0.8",
"moment": "^2.18.1",
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"react-color": "^2.11.4",
"react-datetime": "^2.8.10",
"react-textarea-autosize": "^4.3.0",
@ -29,12 +29,12 @@
},
"devDependencies": {
"@types/node": "^7.0.12",
"@types/react": "^15.0.21",
"@types/react": "^16.0.0",
"git-url-parse": "^6.2.2",
"raw-loader": "^0.5.1",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"style-loader": "^0.17.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"style-loader": "^0.18.2",
"typescript": "^2.2.2",
"typescript-definition-tester": "^0.0.5",
"vue": "^2.4.2"

View File

@ -6,7 +6,7 @@ import KnobStore from '../KnobStore';
describe('React Handler', () => {
describe('wrapStory', () => {
it('should contain the story and add correct props', () => {
const testChannel = { emit: () => {} };
const testChannel = { emit: jest.fn(), on: jest.fn() };
const testStory = () => <div id="test-story">Test Content</div>;
const testContext = {
kind: 'Foo',

View File

@ -4,7 +4,7 @@ import KnobStore from '../KnobStore';
describe('Vue handler', () => {
it('Returns a component with a created function', () => {
const testChannel = { emit: () => {} };
const testChannel = { emit: jest.fn(), on: jest.fn() };
const testStory = () => ({ template: '<div> testStory </div>' });
const testContext = {
kind: 'Foo',

View File

@ -24,8 +24,8 @@
"@storybook/addons": "^3.2.10"
},
"devDependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"shelljs": "^0.7.8"
},
"peerDependencies": {

View File

@ -20,15 +20,15 @@
},
"dependencies": {
"@storybook/addons": "^3.2.10",
"babel-runtime": "^6.23.0",
"prop-types": "^15.5.10",
"babel-runtime": "^6.26.0",
"prop-types": "^15.6.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"git-url-parse": "^6.2.2",
"react": "^15.6.1",
"react": "^16.0.0",
"react-addons-test-utils": "^15.5.1",
"react-dom": "^15.6.1"
"react-dom": "^16.0.0"
},
"peerDependencies": {
"react": "*"

View File

@ -23,9 +23,9 @@
"@storybook/addons": "^3.2.10"
},
"devDependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"shelljs": "^0.7.8"
},
"peerDependencies": {

View File

@ -14,9 +14,9 @@
"storybook": "start-storybook -p 6006"
},
"dependencies": {
"babel-runtime": "^6.23.0",
"babel-runtime": "^6.26.0",
"global": "^4.3.2",
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"read-pkg-up": "^2.0.0"
},
"devDependencies": {
@ -27,8 +27,8 @@
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"react": "^15.6.1",
"react-dom": "^15.6.1"
"react": "^16.0.0",
"react-dom": "^16.0.0"
},
"peerDependencies": {
"@storybook/addons": "^3.2.10",

View File

@ -29,9 +29,9 @@
"@storybook/addons": "^3.2.10",
"@storybook/channel-websocket": "^3.2.10",
"@storybook/ui": "^3.2.11",
"autoprefixer": "^7.1.1",
"autoprefixer": "^7.1.4",
"babel-core": "^6.26.0",
"babel-loader": "^7.0.0",
"babel-loader": "^7.1.2",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
"babel-plugin-transform-class-properties": "^6.24.1",
@ -44,35 +44,35 @@
"babel-preset-minify": "^0.2.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.23.0",
"case-sensitive-paths-webpack-plugin": "^2.0.0",
"babel-runtime": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"commander": "^2.11.0",
"css-loader": "^0.28.1",
"css-loader": "^0.28.7",
"events": "^1.1.1",
"express": "^4.15.3",
"file-loader": "^0.11.1",
"express": "^4.15.5",
"file-loader": "^0.11.2",
"find-cache-dir": "^1.0.0",
"global": "^4.3.2",
"json-loader": "^0.5.4",
"json-loader": "^0.5.7",
"json5": "^0.5.1",
"postcss-loader": "^2.0.5",
"prop-types": "^15.5.10",
"postcss-loader": "^2.0.6",
"prop-types": "^15.6.0",
"react-native-compat": "^1.0.0",
"shelljs": "^0.7.8",
"style-loader": "^0.17.0",
"url-loader": "^0.5.8",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"url-parse": "^1.1.9",
"util-deprecate": "^1.0.2",
"uuid": "^3.1.0",
"webpack": "^2.5.1 || ^3.0.0",
"webpack-dev-middleware": "^1.10.2",
"webpack-hot-middleware": "^2.18.0",
"webpack": "^3.6.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1",
"ws": "^3.0.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-native": "^0.43.3"
},
"peerDependencies": {

View File

@ -27,62 +27,62 @@
"@storybook/addons": "^3.2.10",
"@storybook/channel-postmessage": "^3.2.10",
"@storybook/ui": "^3.2.11",
"airbnb-js-shims": "^1.1.1",
"autoprefixer": "^7.1.1",
"airbnb-js-shims": "^1.3.0",
"autoprefixer": "^7.1.4",
"babel-core": "^6.26.0",
"babel-loader": "^7.0.0",
"babel-plugin-react-docgen": "^1.6.0",
"babel-loader": "^7.1.2",
"babel-plugin-react-docgen": "^1.8.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-minify": "^0.2.0",
"babel-preset-react": "^6.24.1",
"babel-preset-react-app": "^3.0.0",
"babel-preset-react-app": "^3.0.3",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.23.0",
"case-sensitive-paths-webpack-plugin": "^2.0.0",
"babel-runtime": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"chalk": "^2.1.0",
"commander": "^2.11.0",
"common-tags": "^1.4.0",
"configstore": "^3.1.0",
"configstore": "^3.1.1",
"core-js": "^2.5.1",
"css-loader": "^0.28.1",
"express": "^4.15.3",
"file-loader": "^0.11.1",
"css-loader": "^0.28.7",
"express": "^4.15.5",
"file-loader": "^0.11.2",
"find-cache-dir": "^1.0.0",
"glamor": "^2.20.40",
"glamorous": "^4.1.2",
"glamorous": "^4.9.7",
"global": "^4.3.2",
"json-loader": "^0.5.4",
"json-loader": "^0.5.7",
"json-stringify-safe": "^5.0.1",
"json5": "^0.5.1",
"lodash.flattendeep": "^4.4.0",
"lodash.pick": "^4.4.0",
"postcss-flexbugs-fixes": "^3.0.0",
"postcss-loader": "^2.0.5",
"prop-types": "^15.5.10",
"qs": "^6.4.0",
"react-modal": "^2.2.4",
"redux": "^3.6.0",
"request": "^2.81.0",
"serve-favicon": "^2.4.3",
"postcss-flexbugs-fixes": "^3.2.0",
"postcss-loader": "^2.0.6",
"prop-types": "^15.6.0",
"qs": "^6.5.1",
"react-modal": "^2.3.2",
"redux": "^3.7.2",
"request": "^2.83.0",
"serve-favicon": "^2.4.5",
"shelljs": "^0.7.8",
"style-loader": "^0.17.0",
"url-loader": "^0.5.8",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"util-deprecate": "^1.0.2",
"uuid": "^3.1.0",
"webpack": "^2.5.1 || ^3.0.0",
"webpack-dev-middleware": "^1.10.2",
"webpack-hot-middleware": "^2.18.0"
"webpack": "^3.6.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"nodemon": "^1.12.0",
"react": "^15.6.1",
"react-dom": "^15.6.1"
"nodemon": "^1.12.1",
"react": "^16.0.0",
"react-dom": "^16.0.0"
},
"peerDependencies": {
"react": ">=15.0.0 || ^16.0.0-alpha",
"react-dom": ">=15.0.0 || ^16.0.0-alpha"
"react": ">=15.0.0 || ^16.0.0",
"react-dom": ">=15.0.0 || ^16.0.0"
}
}

View File

@ -27,47 +27,47 @@
"@storybook/addons": "^3.2.10",
"@storybook/channel-postmessage": "^3.2.10",
"@storybook/ui": "^3.2.11",
"airbnb-js-shims": "^1.1.1",
"autoprefixer": "^7.1.1",
"airbnb-js-shims": "^1.3.0",
"autoprefixer": "^7.1.4",
"babel-core": "^6.26.0",
"babel-loader": "^7.0.0",
"babel-plugin-react-docgen": "^1.6.0",
"babel-loader": "^7.1.2",
"babel-plugin-react-docgen": "^1.8.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-minify": "^0.2.0",
"babel-preset-react": "^6.24.1",
"babel-preset-react-app": "^3.0.0",
"babel-preset-react-app": "^3.0.3",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.23.0",
"case-sensitive-paths-webpack-plugin": "^2.0.0",
"babel-runtime": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"chalk": "^2.1.0",
"commander": "^2.11.0",
"common-tags": "^1.4.0",
"configstore": "^3.1.0",
"configstore": "^3.1.1",
"core-js": "^2.5.1",
"css-loader": "^0.28.1",
"express": "^4.15.3",
"file-loader": "^0.11.1",
"css-loader": "^0.28.7",
"express": "^4.15.5",
"file-loader": "^0.11.2",
"find-cache-dir": "^1.0.0",
"global": "^4.3.2",
"json-loader": "^0.5.4",
"json-loader": "^0.5.7",
"json-stringify-safe": "^5.0.1",
"json5": "^0.5.1",
"lodash.pick": "^4.4.0",
"postcss-flexbugs-fixes": "^3.0.0",
"postcss-loader": "^2.0.5",
"prop-types": "^15.5.10",
"qs": "^6.4.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-modal": "^2.2.4",
"redux": "^3.6.0",
"request": "^2.81.0",
"serve-favicon": "^2.4.3",
"postcss-flexbugs-fixes": "^3.2.0",
"postcss-loader": "^2.0.6",
"prop-types": "^15.6.0",
"qs": "^6.5.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-modal": "^2.3.2",
"redux": "^3.7.2",
"request": "^2.83.0",
"serve-favicon": "^2.4.5",
"shelljs": "^0.7.8",
"style-loader": "^0.17.0",
"url-loader": "^0.5.8",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"util-deprecate": "^1.0.2",
"uuid": "^3.1.0",
"vue": "^2.4.2",
@ -75,12 +75,12 @@
"vue-loader": "^12.2.1",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.4.2",
"webpack": "^2.5.1 || ^3.0.0",
"webpack-dev-middleware": "^1.10.2",
"webpack-hot-middleware": "^2.18.0"
"webpack": "^3.6.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"nodemon": "^1.12.0"
"nodemon": "^1.12.1"
}
}

View File

@ -43,7 +43,7 @@
"markdown-it-anchor": "^4.0.0",
"markdown-it-replace-link": "^1.0.1",
"marked": "^0.3.6",
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"react": "^15.6.1",
"react-document-title": "^2.0.3",
"react-dom": "^15.6.1",

View File

@ -6569,7 +6569,7 @@ prop-types@15.5.8:
dependencies:
fbjs "^0.8.9"
prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.5.9:
prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.5.9, prop-types@^15.6.0:
version "15.6.0"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
dependencies:

View File

@ -13,27 +13,27 @@
"eventemitter3": "^2.0.3",
"format-json": "^1.0.3",
"glamor": "^2.20.40",
"glamorous": "^4.1.2",
"glamorous": "^4.9.7",
"global": "^4.3.2",
"prop-types": "^15.5.10",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"prop-types": "^15.6.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"uuid": "^3.1.0"
},
"devDependencies": {
"@storybook/addon-actions": "^3.2.0",
"@storybook/addon-centered": "^3.2.0",
"@storybook/addon-events": "^3.2.0",
"@storybook/addon-knobs": "^3.2.0",
"@storybook/addon-info": "^3.2.0",
"@storybook/addon-links": "^3.2.0",
"@storybook/addon-notes": "^3.2.0",
"@storybook/addon-options": "^3.2.0",
"@storybook/addon-storyshots": "^3.2.0",
"@storybook/addons": "^3.2.0",
"@storybook/components": "^3.2.0",
"@storybook/react": "^3.2.0",
"react-scripts": "1.0.1"
"@storybook/addon-actions": "^3.2.11",
"@storybook/addon-centered": "^3.2.10",
"@storybook/addon-events": "^3.2.10",
"@storybook/addon-knobs": "^3.2.10",
"@storybook/addon-info": "^3.2.11",
"@storybook/addon-links": "^3.2.10",
"@storybook/addon-notes": "^3.2.10",
"@storybook/addon-options": "^3.2.10",
"@storybook/addon-storyshots": "^3.2.11",
"@storybook/addons": "^3.2.10",
"@storybook/components": "^3.2.10",
"@storybook/react": "^3.2.11",
"react-scripts": "1.0.14"
},
"private": true
}

View File

@ -210,6 +210,7 @@ exports[`Storyshots AddonInfo.DocgenButton DocgenButton 1`] = `
style={Object {}}
>
<span>
{
<span
style={
Object {
@ -219,6 +220,7 @@ exports[`Storyshots AddonInfo.DocgenButton DocgenButton 1`] = `
>
clicked()
</span>
}
</span>
</span>
</span>
@ -330,6 +332,7 @@ exports[`Storyshots AddonInfo.DocgenButton DocgenButton 1`] = `
</td>
<td>
<span>
{
<span
style={
Object {
@ -339,6 +342,7 @@ exports[`Storyshots AddonInfo.DocgenButton DocgenButton 1`] = `
>
false
</span>
}
</span>
</td>
<td />
@ -370,6 +374,7 @@ exports[`Storyshots AddonInfo.DocgenButton DocgenButton 1`] = `
</td>
<td>
<span>
{
<span
style={
Object {
@ -379,6 +384,7 @@ exports[`Storyshots AddonInfo.DocgenButton DocgenButton 1`] = `
>
onClick()
</span>
}
</span>
</td>
<td />
@ -678,6 +684,7 @@ exports[`Storyshots AddonInfo.FlowTypeButton FlowTypeButton 1`] = `
style={Object {}}
>
<span>
{
<span
style={
Object {
@ -687,6 +694,7 @@ exports[`Storyshots AddonInfo.FlowTypeButton FlowTypeButton 1`] = `
>
clicked()
</span>
}
</span>
</span>
</span>
@ -794,6 +802,7 @@ exports[`Storyshots AddonInfo.FlowTypeButton FlowTypeButton 1`] = `
<td />
<td>
<span>
{
<span
style={
Object {
@ -803,6 +812,7 @@ exports[`Storyshots AddonInfo.FlowTypeButton FlowTypeButton 1`] = `
>
false
</span>
}
</span>
</td>
<td />
@ -815,6 +825,7 @@ exports[`Storyshots AddonInfo.FlowTypeButton FlowTypeButton 1`] = `
<td />
<td>
<span>
{
<span
style={
Object {
@ -824,6 +835,7 @@ exports[`Storyshots AddonInfo.FlowTypeButton FlowTypeButton 1`] = `
>
onClick()
</span>
}
</span>
</td>
<td />
@ -1772,6 +1784,7 @@ exports[`Storyshots Button with new info 1`] = `
</td>
<td>
<span>
{
<span
style={
Object {
@ -1781,6 +1794,7 @@ exports[`Storyshots Button with new info 1`] = `
>
false
</span>
}
</span>
</td>
<td />
@ -1797,6 +1811,7 @@ exports[`Storyshots Button with new info 1`] = `
</td>
<td>
<span>
{
<span
style={
Object {
@ -1806,6 +1821,7 @@ exports[`Storyshots Button with new info 1`] = `
>
0
</span>
}
</span>
</td>
<td />
@ -2326,6 +2342,7 @@ exports[`Storyshots Button with some info 1`] = `
</td>
<td>
<span>
{
<span
style={
Object {
@ -2335,6 +2352,7 @@ exports[`Storyshots Button with some info 1`] = `
>
false
</span>
}
</span>
</td>
<td />
@ -2351,6 +2369,7 @@ exports[`Storyshots Button with some info 1`] = `
</td>
<td>
<span>
{
<span
style={
Object {
@ -2360,6 +2379,7 @@ exports[`Storyshots Button with some info 1`] = `
>
0
</span>
}
</span>
</td>
<td />

View File

@ -31,7 +31,7 @@
},
"dependencies": {
"expo": "^19.0.0",
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"react": "16.0.0-alpha.12",
"react-native": "^0.46.1"
}

View File

@ -8,7 +8,7 @@
"storybook": "storybook start -p 7007"
},
"dependencies": {
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"react": "16.0.0-alpha.6",
"react-native": "0.44.1"
},
@ -27,6 +27,6 @@
"@storybook/components": "file:../../packs/storybook-components.tgz",
"@storybook/react-native": "file:../../packs/storybook-react-native.tgz",
"@storybook/ui": "file:../../packs/storybook-ui.tgz",
"react-dom": "^15.6.1"
"react-dom": "^16.0.0"
}
}

View File

@ -11,16 +11,16 @@
"@storybook/addon-notes": "^3.2.0",
"@storybook/addon-knobs": "^3.2.0",
"babel-core": "^6.26.0",
"babel-loader": "^7.0.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"cross-env": "^3.0.0",
"css-loader": "^0.28.1",
"file-loader": "^0.11.1",
"css-loader": "^0.28.7",
"file-loader": "^0.11.2",
"vue-hot-reload-api": "^2.1.0",
"vue-loader": "^12.2.1",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.4.2",
"webpack": "^2.5.1 || ^3.0.0",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.4.5"
},
"dependencies": {

View File

@ -22,5 +22,6 @@ module.exports = {
],
coverageDirectory: 'coverage',
testEnvironment: 'jsdom',
setupTestFrameworkScriptFile: './node_modules/jest-enzyme/lib/index.js',
setupTestFrameworkScriptFile: './scripts/jest.init.js',
setupFiles: ['raf/polyfill'],
};

View File

@ -15,13 +15,13 @@
},
"dependencies": {
"glamor": "^2.20.40",
"glamorous": "^4.1.2",
"prop-types": "^15.5.10"
"glamorous": "^4.9.7",
"prop-types": "^15.6.0"
},
"devDependencies": {
"enzyme": "^2.9.1",
"react": "^15.6.1",
"react-dom": "^15.6.1"
"enzyme": "^3.0.0",
"react": "^16.0.0",
"react-dom": "^16.0.0"
},
"peerDependencies": {
"react": "*",

View File

@ -8,19 +8,19 @@
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^7.2.2",
"babel-loader": "^7.0.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"eslint": "^3.19.0",
"eslint-plugin-react": "^6.10.3",
"webpack": "^2.5.1 || ^3.0.0",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.4.2"
},
"dependencies": {
"global": "^4.3.2",
"keycode": "^2.1.8",
"react": "^15.6.1",
"react-dom": "^15.6.1"
"react": "^16.0.0",
"react-dom": "^16.0.0"
}
}

View File

@ -17,7 +17,7 @@
"@hypnosphi/fuse.js": "^3.0.9",
"@storybook/components": "^3.2.10",
"@storybook/react-fuzzy": "^0.4.0",
"babel-runtime": "^6.23.0",
"babel-runtime": "^6.26.0",
"deep-equal": "^1.0.1",
"events": "^1.1.1",
"global": "^4.3.2",
@ -28,18 +28,18 @@
"lodash.sortby": "^4.7.0",
"mantra-core": "^1.7.0",
"podda": "^1.2.2",
"prop-types": "^15.5.10",
"qs": "^6.4.0",
"prop-types": "^15.6.0",
"qs": "^6.5.1",
"react-icons": "^2.2.5",
"react-inspector": "^2.1.6",
"react-inspector": "^2.2.0",
"react-komposer": "^2.0.0",
"react-modal": "^2.2.4",
"react-modal": "^2.3.2",
"react-split-pane": "^0.1.65",
"react-treebeard": "^2.0.3",
"redux": "^3.6.0"
"redux": "^3.7.2"
},
"devDependencies": {
"enzyme": "^2.9.1"
"enzyme": "^3.0.0"
},
"peerDependencies": {
"react": "*",

View File

@ -149,7 +149,7 @@ describe('manager.ui.components.left_panel.stories', () => {
/>
);
const kind = wrap.find('[data-name="some"]');
const kind = wrap.find('[data-name="some"]').first();
kind.simulate('click', leftClick);
const { nodes } = wrap.state();
@ -267,7 +267,7 @@ describe('manager.ui.components.left_panel.stories', () => {
/>
);
const kind = wrap.find('[data-name="a"]');
const kind = wrap.find('[data-name="a"]').first();
kind.simulate('click', leftClick);
expect(onSelectStory).toHaveBeenCalledWith('a', null);
@ -309,7 +309,7 @@ describe('manager.ui.components.left_panel.stories', () => {
/>
);
const kind = wrap.find('[data-name="b1"]');
const kind = wrap.find('[data-name="b1"]').first();
kind.simulate('click', leftClick);
expect(onSelectStory).toHaveBeenCalledWith('b', 'b1');
@ -324,16 +324,31 @@ describe('manager.ui.components.left_panel.stories', () => {
selectedStory="a2"
selectedHierarchy={['some', 'name', 'item1']}
onSelectStory={onSelectStory}
sidebarAnimations={false}
/>
);
wrap.find('[data-name="another"]').simulate('click', leftClick);
wrap.find('[data-name="space"]').simulate('click', leftClick);
wrap.find('[data-name="20"]').simulate('click', leftClick);
wrap
.find('[data-name="another"]')
.first()
.simulate('click', leftClick);
wrap
.find('[data-name="space"]')
.first()
.simulate('click', leftClick);
wrap
.find('[data-name="20"]')
.first()
.simulate('click', leftClick);
expect(onSelectStory).toHaveBeenCalledWith('another.space.20', null);
wrap.find('[data-name="b2"]').simulate('click', leftClick);
wrap
.find('[data-name="b2"]')
.first()
.simulate('click', leftClick);
expect(onSelectStory).toHaveBeenCalledWith('another.space.20', 'b2');
});
@ -347,15 +362,25 @@ describe('manager.ui.components.left_panel.stories', () => {
selectedStory="a2"
selectedHierarchy={['some', 'name', 'item1']}
onSelectStory={onSelectStory}
sidebarAnimations={false}
/>
);
wrap.find('[data-name="another"]').simulate('keyDown', { keyCode: 13 });
wrap
.find('[data-name="another"]')
.first()
.simulate('keyDown', { keyCode: 13 });
wrap.find('[data-name="space"]').simulate('keyDown', { keyCode: 13 });
wrap
.find('[data-name="space"]')
.first()
.simulate('keyDown', { keyCode: 13 });
// enter press on native link triggers click event
wrap.find('[data-name="20"]').simulate('click', leftClick);
wrap
.find('[data-name="20"]')
.first()
.simulate('click', leftClick);
expect(onSelectStory).toHaveBeenCalledWith('another.space.20', null);
});

View File

@ -23,9 +23,9 @@ describe('manager.ui.components.left_panel.tree_decorators_utils.test', () => {
const result = highlightNode(node, { highLightText: { color: 'red' } });
expect(shallow(result[0]).html()).toEqual('<span>s</span>');
expect(shallow(result[1]).html()).toEqual('<strong style="color:red;">ome</strong>');
expect(shallow(result[1]).html()).toEqual('<strong style="color:red">ome</strong>');
expect(shallow(result[2]).html()).toEqual('<span> </span>');
expect(shallow(result[3]).html()).toEqual('<strong style="color:red;">nam</strong>');
expect(shallow(result[3]).html()).toEqual('<strong style="color:red">nam</strong>');
expect(shallow(result[4]).html()).toEqual('<span>e</span>');
});
});

View File

@ -38,7 +38,7 @@ describe('manager.ui.components.left_panel.test_filter', () => {
const wrap = mount(<TextFilter onClear={onClear} />);
wrap.setState({ query: 'hello' });
const clear = wrap.find('.clear');
const clear = wrap.find('.clear').first();
clear.simulate('click');
expect(onClear).toHaveBeenCalled();

View File

@ -50,7 +50,8 @@
"codecov": "^2.3.0",
"commander": "^2.11.0",
"danger": "^1.2.0",
"enzyme": "^2.9.1",
"enzyme": "^3.0.0",
"enzyme-adapter-react-16": "^1.0.0",
"eslint": "^4.6.1",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.4.0",
@ -66,17 +67,18 @@
"glob": "^7.1.2",
"husky": "^0.14.3",
"inquirer": "^3.2.3",
"jest": "^21.0.1",
"jest-enzyme": "^3.8.2",
"jest": "^21.2.0",
"jest-enzyme": "^4.0.0",
"lerna": "^2.1.2",
"lint-staged": "^4.1.0",
"lodash": "^4.17.4",
"nodemon": "^1.12.0",
"nodemon": "^1.12.1",
"npmlog": "^4.1.2",
"prettier": "^1.6.1",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1",
"raf": "^3.3.2",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"remark-cli": "^4.0.0",
"remark-lint": "^6.0.1",
"remark-lint-code": "^2.0.0",
@ -125,4 +127,4 @@
"other": "Other"
}
}
}
}

7
scripts/jest.init.js Normal file
View File

@ -0,0 +1,7 @@
import 'jest-enzyme/lib/index';
// setup file
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });

944
yarn.lock

File diff suppressed because it is too large Load Diff