mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 19:11:08 +08:00
FIX tests
This commit is contained in:
parent
28fed37f0d
commit
a7615a0e05
@ -188,7 +188,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
</button>
|
||||
</NavButton>
|
||||
for a component called
|
||||
|
||||
<InlineCode>
|
||||
<code
|
||||
style={
|
||||
@ -232,7 +231,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
</code>
|
||||
</InlineCode>
|
||||
stories located at
|
||||
|
||||
<InlineCode>
|
||||
<code
|
||||
style={
|
||||
@ -256,7 +254,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
<br />
|
||||
Have a look at the
|
||||
|
||||
<Link
|
||||
href="https://storybook.js.org/basics/writing-stories"
|
||||
rel="noopener noreferrer"
|
||||
@ -278,7 +275,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Writing Stories
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
section in our documentation.
|
||||
</p>
|
||||
<Note>
|
||||
|
@ -123,7 +123,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
stories
|
||||
</NavButton>
|
||||
for a component called
|
||||
|
||||
<InlineCode>
|
||||
Button
|
||||
</InlineCode>
|
||||
@ -139,7 +138,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Button
|
||||
</InlineCode>
|
||||
stories located at
|
||||
|
||||
<InlineCode>
|
||||
src/stories/index.js
|
||||
</InlineCode>
|
||||
@ -149,7 +147,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
<br />
|
||||
Have a look at the
|
||||
|
||||
<Link
|
||||
href="https://storybook.js.org/basics/writing-stories"
|
||||
rel="noopener noreferrer"
|
||||
@ -157,7 +154,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
>
|
||||
Writing Stories
|
||||
</Link>
|
||||
|
||||
section in our documentation.
|
||||
</p>
|
||||
<Note>
|
||||
|
@ -123,7 +123,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
stories
|
||||
</NavButton>
|
||||
for a component called
|
||||
|
||||
<InlineCode>
|
||||
Button
|
||||
</InlineCode>
|
||||
@ -139,7 +138,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Button
|
||||
</InlineCode>
|
||||
stories located at
|
||||
|
||||
<InlineCode>
|
||||
src/stories/index.js
|
||||
</InlineCode>
|
||||
@ -149,7 +147,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
<br />
|
||||
Have a look at the
|
||||
|
||||
<Link
|
||||
href="https://storybook.js.org/basics/writing-stories"
|
||||
rel="noopener noreferrer"
|
||||
@ -157,7 +154,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
>
|
||||
Writing Stories
|
||||
</Link>
|
||||
|
||||
section in our documentation.
|
||||
</p>
|
||||
<Note>
|
||||
|
@ -160,7 +160,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
stories
|
||||
</button>
|
||||
for a component called
|
||||
|
||||
<code
|
||||
style={
|
||||
Object {
|
||||
@ -200,7 +199,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Button
|
||||
</code>
|
||||
stories located at
|
||||
|
||||
<code
|
||||
style={
|
||||
Object {
|
||||
@ -222,7 +220,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
<br />
|
||||
Have a look at the
|
||||
|
||||
<a
|
||||
href="https://storybook.js.org/basics/writing-stories"
|
||||
rel="noopener noreferrer"
|
||||
@ -238,7 +235,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
>
|
||||
Writing Stories
|
||||
</a>
|
||||
|
||||
section in our documentation.
|
||||
</p>
|
||||
<p
|
||||
|
@ -64,7 +64,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
stories
|
||||
</button>
|
||||
for a component called
|
||||
|
||||
<code
|
||||
style={
|
||||
Object {
|
||||
@ -104,7 +103,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Button
|
||||
</code>
|
||||
stories located at
|
||||
|
||||
<code
|
||||
style={
|
||||
Object {
|
||||
@ -126,7 +124,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
<br />
|
||||
Have a look at the
|
||||
|
||||
<a
|
||||
href="https://storybook.js.org/basics/writing-stories"
|
||||
rel="noopener noreferrer"
|
||||
@ -142,7 +139,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
>
|
||||
Writing Stories
|
||||
</a>
|
||||
|
||||
section in our documentation.
|
||||
</p>
|
||||
<p
|
||||
|
@ -64,7 +64,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
stories
|
||||
</button>
|
||||
for a component called
|
||||
|
||||
<code
|
||||
style={
|
||||
Object {
|
||||
@ -104,7 +103,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Button
|
||||
</code>
|
||||
stories located at
|
||||
|
||||
<code
|
||||
style={
|
||||
Object {
|
||||
@ -126,7 +124,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
<br />
|
||||
Have a look at the
|
||||
|
||||
<a
|
||||
href="https://storybook.js.org/basics/writing-stories"
|
||||
rel="noopener noreferrer"
|
||||
@ -142,7 +139,6 @@ exports[`Storyshots Welcome to Storybook 1`] = `
|
||||
>
|
||||
Writing Stories
|
||||
</a>
|
||||
|
||||
section in our documentation.
|
||||
</p>
|
||||
<p
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { render, fireEvent } from 'react-testing-library';
|
||||
import { render, fireEvent } from '@testing-library/react';
|
||||
import { withText as WithText, withCounter as WithCounter } from './button.stories';
|
||||
|
||||
const mockAction = jest.fn();
|
||||
|
@ -55,9 +55,43 @@ exports[`Storyshots Addons|Backgrounds Example 2 1`] = `
|
||||
`;
|
||||
|
||||
exports[`Storyshots Addons|Centered Button 1`] = `
|
||||
<div
|
||||
style={
|
||||
Object {
|
||||
Object {
|
||||
"__b": 0,
|
||||
"__c": null,
|
||||
"__e": null,
|
||||
"__k": null,
|
||||
"__p": null,
|
||||
"constructor": undefined,
|
||||
"key": undefined,
|
||||
"l": null,
|
||||
"props": Object {
|
||||
"children": Object {
|
||||
"__b": 0,
|
||||
"__c": null,
|
||||
"__e": null,
|
||||
"__k": null,
|
||||
"__p": null,
|
||||
"constructor": undefined,
|
||||
"key": undefined,
|
||||
"l": null,
|
||||
"props": Object {
|
||||
"children": VNode {
|
||||
"attributes": undefined,
|
||||
"children": Array [
|
||||
"A button",
|
||||
],
|
||||
"key": undefined,
|
||||
"nodeName": [Function],
|
||||
},
|
||||
"style": Object {
|
||||
"margin": "auto",
|
||||
"maxHeight": "100%",
|
||||
},
|
||||
},
|
||||
"ref": undefined,
|
||||
"type": "div",
|
||||
},
|
||||
"style": Object {
|
||||
"alignItems": "center",
|
||||
"bottom": "0",
|
||||
"display": "flex",
|
||||
@ -66,24 +100,11 @@ exports[`Storyshots Addons|Centered Button 1`] = `
|
||||
"position": "fixed",
|
||||
"right": "0",
|
||||
"top": "0",
|
||||
}
|
||||
}
|
||||
>
|
||||
<div
|
||||
style={
|
||||
Object {
|
||||
"margin": "auto",
|
||||
"maxHeight": "100%",
|
||||
}
|
||||
}
|
||||
>
|
||||
<button
|
||||
class="button"
|
||||
>
|
||||
A button
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
},
|
||||
},
|
||||
"ref": undefined,
|
||||
"type": "div",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`Storyshots Addons|Contexts Simple Css Theming 1`] = `
|
||||
@ -273,7 +294,7 @@ exports[`Storyshots Welcome To Storybook 1`] = `
|
||||
>
|
||||
stories
|
||||
</button>
|
||||
for a component called
|
||||
for a component called
|
||||
<code
|
||||
style={
|
||||
Object {
|
||||
@ -312,7 +333,7 @@ exports[`Storyshots Welcome To Storybook 1`] = `
|
||||
>
|
||||
Button
|
||||
</code>
|
||||
stories located at
|
||||
stories located at
|
||||
<code
|
||||
style={
|
||||
Object {
|
||||
@ -333,7 +354,7 @@ exports[`Storyshots Welcome To Storybook 1`] = `
|
||||
<p>
|
||||
Usually we create stories with smaller UI components in the app.
|
||||
<br />
|
||||
Have a look at the
|
||||
Have a look at the
|
||||
<a
|
||||
href="https://storybook.js.org/basics/writing-stories"
|
||||
rel="noopener noreferrer"
|
||||
@ -349,7 +370,7 @@ exports[`Storyshots Welcome To Storybook 1`] = `
|
||||
>
|
||||
Writing Stories
|
||||
</a>
|
||||
section in our documentation.
|
||||
section in our documentation.
|
||||
</p>
|
||||
<p
|
||||
style={
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import { render } from 'react-testing-library';
|
||||
import { render } from '@testing-library/react';
|
||||
|
||||
import { ThemeProvider, themes, convert } from '@storybook/theming';
|
||||
import ShortcutsScreen from './shortcuts';
|
||||
|
@ -138,6 +138,7 @@
|
||||
"@emotion/snapshot-serializer": "^0.8.2",
|
||||
"@storybook/eslint-config-storybook": "^2.0.0",
|
||||
"@storybook/linter-config": "^2.0.0",
|
||||
"@testing-library/react": "^9.2.0",
|
||||
"@types/jest": "^24.0.11",
|
||||
"@types/lodash": "^4.14.129",
|
||||
"@types/node": "^12.7.9",
|
||||
@ -200,7 +201,6 @@
|
||||
"react": "^16.8.3",
|
||||
"react-dom": "^16.8.3",
|
||||
"react-test-renderer": "^16.8.3",
|
||||
"react-testing-library": "^8.0.1",
|
||||
"recursive-copy": "^2.0.10",
|
||||
"regenerator-runtime": "^0.12.1",
|
||||
"remark-cli": "^7.0.0",
|
||||
|
57
yarn.lock
57
yarn.lock
@ -1482,7 +1482,7 @@
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.2"
|
||||
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5":
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0":
|
||||
version "7.6.2"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.2.tgz#c3d6e41b304ef10dcf13777a33e7694ec4a9a6dd"
|
||||
integrity sha512-EXxN64agfUqqIGeEjI5dL5z0Sw0ZwWo1mLTi4mQowCZ42O59b7DRpZAnTC6OqdF28wMBMFKNb/4uFGrVaigSpg==
|
||||
@ -3371,6 +3371,11 @@
|
||||
component-type "^1.2.1"
|
||||
join-component "^1.1.0"
|
||||
|
||||
"@sheerun/mutationobserver-shim@^0.3.2":
|
||||
version "0.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#8013f2af54a2b7d735f71560ff360d3a8176a87b"
|
||||
integrity sha512-vTCdPp/T/Q3oSqwHmZ5Kpa9oI7iLtGl3RQaA/NyLHikvcrPxACkkKVr/XzkSPJWXHRhKGzVvb0urJsbMlRxi1Q==
|
||||
|
||||
"@sindresorhus/df@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-1.0.1.tgz#c69b66f52f6fcdd287c807df210305dbaf78500d"
|
||||
@ -3872,6 +3877,27 @@
|
||||
dependencies:
|
||||
defer-to-connect "^1.0.1"
|
||||
|
||||
"@testing-library/dom@^6.3.0":
|
||||
version "6.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-6.5.0.tgz#9419fec57a544917bd5e398d40826425be50ee0a"
|
||||
integrity sha512-3lQx248dhJzvV2a76F1VaqehX+iquSVVW27caDaLoQZdUHEZjB370n7FO2WoYwOQQ7NB10AvfPhrARYnNgvf1g==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.5.5"
|
||||
"@sheerun/mutationobserver-shim" "^0.3.2"
|
||||
"@types/testing-library__dom" "^6.0.0"
|
||||
aria-query "3.0.0"
|
||||
pretty-format "^24.8.0"
|
||||
wait-for-expect "^1.3.0"
|
||||
|
||||
"@testing-library/react@^9.2.0":
|
||||
version "9.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-9.2.0.tgz#143ad2d96b03c3c334e47aaf33cc2c9b7d007123"
|
||||
integrity sha512-Hr87KZflfI+vPZjgyzBKQHolQHiXGU5aTGjQSCJdH/yGPbm+IzrvuWPS97GD3RUH3rSS1IXq1e2Sn8Hmyw2ctA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.6.0"
|
||||
"@testing-library/dom" "^6.3.0"
|
||||
"@types/testing-library__react" "^9.1.0"
|
||||
|
||||
"@types/acorn@^4.0.3":
|
||||
version "4.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.5.tgz#e29fdf884695e77be4e99e67d748f5147255752d"
|
||||
@ -4277,6 +4303,21 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.2.tgz#e13182e1b69871a422d7863e11a4a6f5b814a4bd"
|
||||
integrity sha512-42zEJkBpNfMEAvWR5WlwtTH22oDzcMjFsL9gDGExwF8X8WvAiw7Vwop7hPw03QT8TKfec83LwbHj6SvpqM4ELQ==
|
||||
|
||||
"@types/testing-library__dom@*", "@types/testing-library__dom@^6.0.0":
|
||||
version "6.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/testing-library__dom/-/testing-library__dom-6.4.0.tgz#a9411ed4942a11260ffd1790c4d2225959171c72"
|
||||
integrity sha512-Ae8p2knO5h4JMYcZzOE6lSaV4jg1JqRFjI2J3vU6Dzf9SWQjpyOtJUekFZ51Jv4+Sbsvy4XVocka7lCuzKkUmQ==
|
||||
dependencies:
|
||||
pretty-format "^24.3.0"
|
||||
|
||||
"@types/testing-library__react@^9.1.0":
|
||||
version "9.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/testing-library__react/-/testing-library__react-9.1.1.tgz#4bcb8bba54b07fbb6c084f2f00e7f9410e587c10"
|
||||
integrity sha512-8/toTJaIlS3BC7JrK2ElTnbjH8tmFP7atdL2ZsIa1JDmH9RKSm/7Wp5oMDJzXoWr988Mv7ym/XZ8LRglyoGCGw==
|
||||
dependencies:
|
||||
"@types/react-dom" "*"
|
||||
"@types/testing-library__dom" "*"
|
||||
|
||||
"@types/uglify-js@*":
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082"
|
||||
@ -5336,7 +5377,7 @@ argv@^0.0.2:
|
||||
resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab"
|
||||
integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=
|
||||
|
||||
aria-query@^3.0.0:
|
||||
aria-query@3.0.0, aria-query@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc"
|
||||
integrity sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=
|
||||
@ -23436,7 +23477,7 @@ pretty-format@^23.4.1, pretty-format@^23.6.0:
|
||||
ansi-regex "^3.0.0"
|
||||
ansi-styles "^3.2.0"
|
||||
|
||||
pretty-format@^24.0.0, pretty-format@^24.9.0:
|
||||
pretty-format@^24.0.0, pretty-format@^24.3.0, pretty-format@^24.8.0, pretty-format@^24.9.0:
|
||||
version "24.9.0"
|
||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"
|
||||
integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==
|
||||
@ -25122,11 +25163,6 @@ react-test-renderer@16.10.1, react-test-renderer@^16.0.0-0, react-test-renderer@
|
||||
react-is "^16.8.6"
|
||||
scheduler "^0.16.1"
|
||||
|
||||
react-testing-library@^8.0.1:
|
||||
version "8.0.1"
|
||||
resolved "https://registry.yarnpkg.com/react-testing-library/-/react-testing-library-8.0.1.tgz#b3dd43bce3fa88423cf0a23292fb819023c227cc"
|
||||
integrity sha512-Gq4JC9r3prA4hYwo7afcbHHMFckO29+5Nrh2KblAEPuK/DWaU0bJE1vtpAgLhzhY9bBirmcgjjIHljHEwGAXKw==
|
||||
|
||||
react-textarea-autosize@^7.0.4, react-textarea-autosize@^7.1.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-7.1.0.tgz#3132cb77e65d94417558d37c0bfe415a5afd3445"
|
||||
@ -30450,6 +30486,11 @@ w3c-xmlserializer@^1.0.1, w3c-xmlserializer@^1.1.2:
|
||||
webidl-conversions "^4.0.2"
|
||||
xml-name-validator "^3.0.0"
|
||||
|
||||
wait-for-expect@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-1.3.0.tgz#65241ce355425f907f5d127bdb5e72c412ff830c"
|
||||
integrity sha512-8fJU7jiA96HfGPt+P/UilelSAZfhMBJ52YhKzlmZQvKEZU2EcD1GQ0yqGB6liLdHjYtYAoGVigYwdxr5rktvzA==
|
||||
|
||||
walk-sync@^0.2.5:
|
||||
version "0.2.7"
|
||||
resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.2.7.tgz#b49be4ee6867657aeb736978b56a29d10fa39969"
|
||||
|
Loading…
x
Reference in New Issue
Block a user