(options, filter)
| 135 | } |
| 136 | |
| 137 | function wireOnStep(options, filter) { |
| 138 | let currentTest = null |
| 139 | let stepCount = 0 |
| 140 | event.dispatcher.on(event.test.before, test => { |
| 141 | currentTest = test |
| 142 | stepCount = 0 |
| 143 | }) |
| 144 | event.dispatcher.on(event.step.after, step => { |
| 145 | if (!currentTest) return |
| 146 | if (!filter(step)) return |
| 147 | stepCount++ |
| 148 | const name = `${testToFileName(currentTest, { suffix: '', unique: options.uniqueScreenshotNames })}.step_${stepCount}.png` |
| 149 | scheduleScreenshot(currentTest, name, options) |
| 150 | }) |
| 151 | } |
| 152 | |
| 153 | function wireOnUrl(options, pattern) { |
| 154 | let currentTest = null |
no test coverage detected