fix story name error, update addon-jest.stories.storyshot

This commit is contained in:
klimentru1986 2018-05-05 22:43:40 +03:00
parent a06dc24f56
commit 7bdc6e89a9
2 changed files with 110 additions and 5 deletions

View File

@ -0,0 +1,105 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Storyshots Addon|Jest app.component with jest tests 1`] = `
<storybook-dynamic-app-root
cfr={[Function CodegenComponentFactoryResolver]}
data={[Function Object]}
target={[Function ViewContainerRef_]}
>
<storybook-app-root>
<div
class="hide"
style="color: red; font-size: 30px; text-align: center;"
>
This should be hidden, if not - scss is not loaded as needed.
</div>
<div
style="text-align:center"
>
<h1>
Welcome to app!
</h1>
<img
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyNTAgMjUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNTAgMjUwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojREQwMDMxO30NCgkuc3Qxe2ZpbGw6I0MzMDAyRjt9DQoJLnN0MntmaWxsOiNGRkZGRkY7fQ0KPC9zdHlsZT4NCjxnPg0KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMTI1LDMwIDEyNSwzMCAxMjUsMzAgMzEuOSw2My4yIDQ2LjEsMTg2LjMgMTI1LDIzMCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAJIi8+DQoJPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIxMjUsMzAgMTI1LDUyLjIgMTI1LDUyLjEgMTI1LDE1My40IDEyNSwxNTMuNCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAxMjUsMzAgCSIvPg0KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo="
width="300"
/>
</div>
<h2>
Here are some links to help you start:
</h2>
<ul>
<li>
<h2>
<a
href="https://angular.io/tutorial"
target="_blank"
>
Tour of Heroes
</a>
</h2>
</li>
<li>
<h2>
<a
href="https://github.com/angular/angular-cli/wiki"
target="_blank"
>
CLI Documentation
</a>
</h2>
</li>
<li>
<h2>
<a
href="https://blog.angular.io//"
target="_blank"
>
Angular blog
</a>
</h2>
</li>
</ul>
</storybook-app-root>
</storybook-dynamic-app-root>
`;

View File

@ -3,8 +3,8 @@ import { AppComponent } from '../app/app.component';
import { wTests } from '../../.storybook/withTests';
storiesOf('Addon|Jest', module)
.addDecorator(wTests('app.component'))
.add('app.component with jest tests', () => ({
component: AppComponent,
props: {},
}));
.addDecorator(wTests('app.component'))
.add('app.component with jest tests', () => ({
component: AppComponent,
props: {},
}));