@@ -28,21 +28,25 @@ describe('Router', function () {
2828
2929 adminHref : hrefEles . get ( 2 ) ,
3030 adminPreloadList : element . all ( by . css ( 'my-app > ng-component > ng-component > ul > li' ) ) ,
31+
3132 loginHref : hrefEles . get ( 3 ) ,
3233 loginButton : element . all ( by . css ( 'my-app > ng-component > p > button' ) ) ,
33-
34- sidekicksButton : element . all ( by . css ( 'my-app > ng-component > button' ) ) ,
35-
34+
35+ contactHref : hrefEles . get ( 4 ) ,
36+ contactCancelButton : element . all ( by . buttonText ( 'Cancel' ) ) ,
37+
38+ outletComponents : element . all ( by . css ( 'my-app > ng-component' ) )
3639 } ;
3740 }
3841
3942 it ( 'should be able to see the start screen' , function ( ) {
4043 let page = getPageStruct ( ) ;
41- expect ( page . hrefs . count ( ) ) . toEqual ( 4 , 'should be 4 dashboard choices' ) ;
44+ expect ( page . hrefs . count ( ) ) . toEqual ( 5 , 'should be 5 dashboard choices' ) ;
4245 expect ( page . crisisHref . getText ( ) ) . toEqual ( 'Crisis Center' ) ;
4346 expect ( page . heroesHref . getText ( ) ) . toEqual ( 'Heroes' ) ;
4447 expect ( page . adminHref . getText ( ) ) . toEqual ( 'Admin' ) ;
4548 expect ( page . loginHref . getText ( ) ) . toEqual ( 'Login' ) ;
49+ expect ( page . contactHref . getText ( ) ) . toEqual ( 'Contact' ) ;
4650 } ) ;
4751
4852 it ( 'should be able to see crises center items' , function ( ) {
@@ -120,12 +124,12 @@ describe('Router', function () {
120124 } ) ;
121125 } ) ;
122126
123- it ( 'should be able to handle 404 pages ' , function ( ) {
127+ it ( 'should be able to see the secondary route ' , function ( ) {
124128 let page = getPageStruct ( ) ;
125129 page . heroesHref . click ( ) . then ( function ( ) {
126- return page . sidekicksButton . click ( ) ;
130+ return page . contactHref . click ( ) ;
127131 } ) . then ( function ( ) {
128- expect ( page . routerTitle . getText ( ) ) . toContain ( 'Page Not Found ') ;
132+ expect ( page . outletComponents . count ( ) ) . toBe ( 2 , 'should be 2 displayed routes ') ;
129133 } ) ;
130134 } ) ;
131135
0 commit comments