Skip to content

Commit d85d975

Browse files
author
David Haeffner
committed
Updated playback to enable plugins to abort during the "playbackStarted" event
1 parent 5ae0879 commit d85d975

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/selenium-ide/src/neo/stores/view/PlaybackState.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ class PlaybackState {
398398
testId: this.currentRunningTest.id,
399399
testName: this.currentRunningTest.name,
400400
projectName: UiState._project.name,
401+
commands: this.runningQueue,
401402
},
402403
},
403404
(plugin, resolved) => {
@@ -412,7 +413,19 @@ class PlaybackState {
412413
log.setStatus(LogTypes.Success)
413414
}
414415
}
415-
).then(this.play)
416+
).then(responses => {
417+
if (
418+
responses &&
419+
responses[0].response &&
420+
responses[0].response.status === 'fatal'
421+
) {
422+
this.logger.log(
423+
`[${responses[0].plugin.name}]: ${responses[0].response.message}`
424+
)
425+
} else {
426+
this.play()
427+
}
428+
})
416429
})
417430
this.beforePlaying(playTest)
418431
}

0 commit comments

Comments
 (0)