File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " selenium-cucumber-js" ,
3- "version" : " 1.2.7 " ,
3+ "version" : " 1.2.8 " ,
44 "description" : " A debuggable JS BDD framework that uses the official selenium-webdriver for Node and cucumber-js" ,
55 "main" : " index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -173,22 +173,25 @@ module.exports = function () {
173173 } ) ;
174174
175175 // executed after each scenario (always closes the browser to ensure fresh tests)
176- this . After ( function ( scenario , done ) {
176+ this . After ( function ( scenario ) {
177177
178178 if ( scenario . isFailed ( ) ) {
179179
180180 // add a screenshot to the error report
181- driver . takeScreenshot ( ) . then ( function ( screenShot ) {
181+ return driver . takeScreenshot ( ) . then ( function ( screenShot ) {
182+
182183 scenario . attach ( new Buffer ( screenShot , 'base64' ) , 'image/png' ) ;
183- driver . close ( ) ;
184- driver . quit ( ) . then ( done ) ;
185- } ) ;
186184
185+ return driver . close ( ) . then ( function ( ) {
186+ return driver . quit ( ) ;
187+ } ) ;
188+ } ) ;
187189 }
188190 else {
189191
190- driver . close ( ) ;
191- driver . quit ( ) . then ( done ) ;
192+ return driver . close ( ) . then ( function ( ) {
193+ return driver . quit ( ) ;
194+ } ) ;
192195 }
193196 } ) ;
194197} ;
You can’t perform that action at this time.
0 commit comments