From 4d7d95f935f72c000e055e7e2233cd2d6543d9f1 Mon Sep 17 00:00:00 2001 From: Jonas Amundsen Date: Fri, 17 Jan 2025 19:29:54 +0100 Subject: [PATCH] Add support for Cypress v14 --- CHANGELOG.md | 10 ++++++++++ features/support/hooks.ts | 1 + package.json | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ea4b3ed..b3c96158 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## Unreleased + +Breaking changes: + +- Dropped support for Cypress v10. + +Other changes: + +- Added support for Cypress v14, fixes [#1267](https://github.com/badeball/cypress-cucumber-preprocessor/issues/1267). + ## v21.0.3 - Correctly represent consecutive BeforeAll & AfterAll hooks in the command log, relates to [#1250](https://github.com/badeball/cypress-cucumber-preprocessor/issues/1250). diff --git a/features/support/hooks.ts b/features/support/hooks.ts index ad4848ec..ed818cbe 100644 --- a/features/support/hooks.ts +++ b/features/support/hooks.ts @@ -33,6 +33,7 @@ Before(async function ({ gherkinDocument, pickle }) { ` Cypress.Commands.add("expectCommandLogEntry", ({ method, message }) => { const selector = \`.command-info:has(> .command-method:contains('\${method}')) .command-message-text:contains('\${message}')\`; + cy.wait(0); // For unknown reasons, this became important with Cypress v14. cy.then(() => {}).should(() => { expect(Cypress.$(top.document).find(selector)).to.exist; }); diff --git a/package.json b/package.json index 2ba09c0c..91b65dae 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@typescript-eslint/eslint-plugin": "^8.0.0", "@typescript-eslint/parser": "^8.0.0", "ast-types": "^0.15.2", - "cypress": "^13.13.2", + "cypress": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0", "esbuild": "^0.23.1", "eslint": "^9.8.0", "genversion": "^3.2.0", @@ -127,7 +127,7 @@ "webpack": "^5.93.0" }, "peerDependencies": { - "cypress": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" + "cypress": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0" }, "engines": { "node": ">=18.0.0"