diff --git a/CHANGELOG.md b/CHANGELOG.md index 2715c437..374efadf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## Unreleased + +- Omit outputting empty "then" entries to the command log, relates to [#1214](https://github.com/badeball/cypress-cucumber-preprocessor/discussions/1214). + ## v20.1.0 - Include skipped (not omitted) tests in reports, fixes [#1041](https://github.com/badeball/cypress-cucumber-preprocessor/issues/1041). diff --git a/lib/helpers/cypress.ts b/lib/helpers/cypress.ts index 1433bf27..9479f7f8 100644 --- a/lib/helpers/cypress.ts +++ b/lib/helpers/cypress.ts @@ -43,7 +43,7 @@ export function runStepWithLogGroup(options: { argument?: DataTable | string; text?: string; }) { - Cypress.log({ + const log = Cypress.log({ name: options.keyword, message: options.text == null ? "" : `**${options.text}**`, groupStart: true, @@ -71,7 +71,7 @@ export function runStepWithLogGroup(options: { } return ensureChain(ret).then((result) => { - Cypress.log({ groupEnd: true, emitOnly: true } as object); + (log as any).endGroup(); return result; }); }