11module . exports = function ( ) {
22
3- this . Given ( / ^ I a m o n t h e M a m m o t h W o r k w e a r h o m e p a g e $ / , function ( done ) {
3+ this . Given ( / ^ I a m o n t h e M a m m o t h W o r k w e a r h o m e p a g e $ / , function ( ) {
44
55 // load google
6- helpers . loadPage ( page . mammothWorkwear . url ) . then ( function ( ) {
7- done ( ) ;
8- } ) ;
6+ return helpers . loadPage ( page . mammothWorkwear . url ) ;
97 } ) ;
108
11- this . When ( / ^ I c l i c k n a v i g a t i o n i t e m " ( [ ^ " ] * ) " $ / , function ( linkTitle , done ) {
9+ this . When ( / ^ I c l i c k n a v i g a t i o n i t e m " ( [ ^ " ] * ) " $ / , function ( linkTitle ) {
1210
1311 // click an item in the search results via the google page object
14- page . mammothWorkwear . clickNavigationItem ( linkTitle ) . then ( function ( ) {
15- done ( ) ;
16- } ) ;
12+ return page . mammothWorkwear . clickNavigationItem ( linkTitle ) ;
1713 } ) ;
1814
19- this . Then ( / ^ I c l i c k p r o d u c t i t e m " ( [ ^ " ] * ) " $ / , function ( productTitle , done ) {
15+ this . Then ( / ^ I c l i c k p r o d u c t i t e m " ( [ ^ " ] * ) " $ / , function ( productTitle ) {
2016
2117 // click an item in the search results via the google page object
22- page . mammothWorkwear . clickProductItem ( productTitle ) . then ( function ( ) {
23- done ( ) ;
24- } ) ;
18+ return page . mammothWorkwear . clickProductItem ( productTitle ) ;
2519 } ) ;
2620
27- this . Then ( / ^ I s h o u l d s e e p r o d u c t d e t a i l w i t h t i t l e " ( [ ^ " ] * ) " $ / , function ( pageTitle , done ) {
21+ this . Then ( / ^ I s h o u l d s e e p r o d u c t d e t a i l w i t h t i t l e " ( [ ^ " ] * ) " $ / , function ( pageTitle ) {
2822
29- page . mammothWorkwear . titleContains ( pageTitle ) . then ( function ( ) {
30- done ( ) ;
31- } ) ;
23+ return page . mammothWorkwear . titleContains ( pageTitle ) ;
3224 } ) ;
3325} ;
0 commit comments