@@ -4,8 +4,7 @@ import {withInfo} from '@storybook/addon-info';
4
4
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' ;
5
5
import { mount } from 'enzyme' ;
6
6
import { assert } from 'chai' ;
7
- import any from '@travi/any' ;
8
- import { storiesOf , specs } from '../.storybook/facade-storybook' ;
7
+ import { storiesOf , linkTo , specs } from '../.storybook/facade-storybook' ;
9
8
import { describe , it } from '../.storybook/facade-mocha' ;
10
9
import ResourceList from '../src/resources/list/maybe-list' ;
11
10
@@ -15,7 +14,10 @@ storiesOf('Resource List', module)
15
14
{ story ( ) }
16
15
</ MuiThemeProvider >
17
16
) )
18
- . addDecorator ( storyRouter ( ) )
17
+ . addDecorator ( storyRouter ( {
18
+ '/users/travi' : linkTo ( 'Resource Details' , 'person' ) ,
19
+ '/resources/generic' : linkTo ( 'Resource Details' , 'generic resource' )
20
+ } ) )
19
21
. add (
20
22
'empty list' ,
21
23
withInfo ( 'this is the empty state' ) ( ( ) => {
@@ -44,9 +46,9 @@ storiesOf('Resource List', module)
44
46
resourceType = "rides"
45
47
loading = { false }
46
48
resources = { [
47
- { id : 1 , displayName : 'corvette' , links : { self : { href : any . url ( ) } } } ,
48
- { id : 2 , displayName : 'truck' , links : { self : { href : any . url ( ) } } } ,
49
- { id : 3 , displayName : 'camaro' , links : { self : { href : any . url ( ) } } }
49
+ { id : 1 , displayName : 'corvette' , links : { self : { href : '/resources/generic' } } } ,
50
+ { id : 2 , displayName : 'truck' , links : { self : { href : '/resources/generic' } } } ,
51
+ { id : 3 , displayName : 'camaro' , links : { self : { href : '/resources/generic' } } }
50
52
] }
51
53
/>
52
54
) )
@@ -62,7 +64,7 @@ storiesOf('Resource List', module)
62
64
id : 1 ,
63
65
displayName : 'Matt Travi' ,
64
66
thumbnail : { src : 'https://www.gravatar.com/avatar/f69785efc7d990da20f1ab49fc2a6648?size=32' } ,
65
- links : { }
67
+ links : { self : { href : '/users/travi' } }
66
68
}
67
69
] }
68
70
/>
0 commit comments