Skip to content

Commit 86ea01e

Browse files
authored
Fix for stepByStepReport: cheerio ESM import and missing screenshot capture (#5508)
1 parent c5572aa commit 86ea01e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/plugin/stepByStepReport.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import figures from 'figures'
44
import fs from 'fs'
55
import { mkdirp } from 'mkdirp'
66
import path from 'path'
7-
import cheerio from 'cheerio'
7+
import * as cheerio from 'cheerio'
88

99
import Container from '../container.js'
1010
import recorder from '../recorder.js'
@@ -198,7 +198,7 @@ export default function (config) {
198198
// Ignore steps from BeforeSuite function
199199
if (scenarioFailed && config.disableScreenshotOnFail) return
200200
if (step.metaStep && step.metaStep.name === 'BeforeSuite') return
201-
if (!step.test) return // Ignore steps from AfterSuite
201+
if (!currentTest) return // Ignore steps from AfterSuite
202202

203203
const fileName = `${pad.substring(0, pad.length - stepNum.toString().length) + stepNum.toString()}.png`
204204
if (step.status === 'failed') {

0 commit comments

Comments
 (0)