diff --git a/lib/plugin/stepByStepReport.js b/lib/plugin/stepByStepReport.js index ee1cb52ec..dc107e8f4 100644 --- a/lib/plugin/stepByStepReport.js +++ b/lib/plugin/stepByStepReport.js @@ -4,7 +4,7 @@ import figures from 'figures' import fs from 'fs' import { mkdirp } from 'mkdirp' import path from 'path' -import cheerio from 'cheerio' +import * as cheerio from 'cheerio' import Container from '../container.js' import recorder from '../recorder.js' @@ -198,7 +198,7 @@ export default function (config) { // Ignore steps from BeforeSuite function if (scenarioFailed && config.disableScreenshotOnFail) return if (step.metaStep && step.metaStep.name === 'BeforeSuite') return - if (!step.test) return // Ignore steps from AfterSuite + if (!currentTest) return // Ignore steps from AfterSuite const fileName = `${pad.substring(0, pad.length - stepNum.toString().length) + stepNum.toString()}.png` if (step.status === 'failed') {