All notable changes to this project will be documented in this file.
- Handle more corner cases related to reload-behavior, fixes #1142.
Breaking changes:
-
The
onAfterStep
hook, part of the API for adding attachments from the Node environment, is no longer invoked after scenario hooks, IE.After(..)
andBefore(..)
.- It now more closely mimic the behavior of
AfterStep(..)
, which it was supposed to.
- It now more closely mimic the behavior of
-
The above-mentioned
onAfterStep
hook, is no longer invoked with awasLastStep
property.- This is now easily determined by using other properties, as reflected in the docs.
-
Messages reports are no longer implicitly enabled and written to disk when enabling JSON or HTML reports, fixes #1140.
Other changes:
-
Emit meta information (lib version, node version, os, ci) in meesage reports, fixes #1133.
- This is in line with how cucumber-js behaves.
-
The above-mentioned
onAfterStep
hook, is now invoked with a bunch of relevant data, relates to #1089. -
Add a tool for merging messages reports, fixes #1137.
- This is first and foremost created to support merging related reports obtained through parallelization using Cypress Cloud.
-
Add order option to all hooks, fixes #481.
-
Add a
filterSpecsMixedMode
option, fixes #1125.- This essentially reverts 0b2702b from v19.1.1 and re-introduces original behavior of discarding non-feature specs by default and introduces an option to control this behavior.
-
Mock and imitate Cypress globals during diagnostics / dry run, fixes #1120.
-
Avoid filtering non-feature specs upon tag expressions containing negating expressions, fixes #1116.
- Non-feature specs are filtered as if containing an empty set of tags.
- Add
BeforeAll(..)
andAfterAll(..)
hooks, fixes #758.
- Fix type members to account for scenario hook names, fixes #1113.
Breaking changes:
-
Run
After(..)
hooks in reversed order of definition. This is in line with how cucumber-js behaves. -
Updated all dependencies, including
@cucumber/cucumber
to v10.- String literal attachments are now base64-encoded in JSON reports, ref. cucumber/cucumber-js#2261.
Other changes:
-
Scenario hooks (
Before(..)
andAfter(..)
) are now invoked with an object containing a bunch of relevant data. This is in line with how cucumber-js behaves. -
Hooks may now be optionally named. This is in line with how cucumber-js behaves.
-
Omit outputting internal task to the command log when using
attach(..)
. -
Add an API for adding attachments from the Node environment, fixes #1089.
-
Make the compile output play nicer with ESM, relates to #1093.
-
Allow visiting unconfigured domains in
before
hooks, fixes #1091.
- Add support for Cypress v13, fixes #1084.
- Update dependency on esbuild, fixes #1068.
- Allow (testing) type-specific configuration of
stepDefinitions
, fixes #1065.
-
Add support for skipped steps, fixes #1053.
-
Handle use of
this.skip()
correctly in reports, fixes #1054. -
Export type member
IPreprocessorConfiguration
, fixes / supersedes #1057. -
Fix asynchronous scheduling of nested step, fixes #1063.
- Give each TestStep (from
@cucumber/messages
) a unique ID, fixes #1034.
Breaking changes:
-
TypeScript users that have previously been unable to upgrade
moduleResolution
tonode16
, and use thepaths
property as a workaround, must update their paths.From this
{ "compilerOptions": { "paths": { "@badeball/cypress-cucumber-preprocessor/*": ["./node_modules/@badeball/cypress-cucumber-preprocessor/dist/bundler-utils/*"] } } }
To this
{ "compilerOptions": { "paths": { "@badeball/cypress-cucumber-preprocessor/*": ["./node_modules/@badeball/cypress-cucumber-preprocessor/dist/subpath-entrypoints/*"] } } }
Other changes:
- Add experimental support for pretty output similar to that of
@cucumber/pretty-formatter
, fixes #810.
-
Step hooks are logged using separate log groups, similar to how scenario hooks are logged.
-
Properly escape error messages in interactive mode.
-
Fix error in non-feature specs under certain conditions, fixes #1028.
-
Allow doesFeatureMatch to be called in support files, fixes #1025.
-
Add BeforeStep and AfterStep hooks, fixes #847.
-
Report failing steps with correct duration, fixes #963.
-
Allow generation of JSON reports with hooks (After / Before) even if
baseUrl
is undefined, fixes #1017. -
Correctly filter test cases in HTML reports when using
omitFiltered
, fixes #1018.
-
Add support for (testing) type-specific configuration, fixes #700.
-
Add support for component testing using Vite as bundler, fixes #698.
-
Output data tables in command log, fixes #782 (by @nilgaar).
Breaking changes:
-
Drop support for Cypress v9.
-
Node v18 or beyond is now required.
-
The package now utilizes Conditional Exports and you may have to set
moduleResolution
tonode16
in yourtsconfig.json
depending on what parts of the package you use (assuming you're using TypeScript).-
TypeScript users that are unable to upgrade
moduleResolution
tonode16
, can use thepaths
property as a workaround, like shown below.{ "compilerOptions": { "paths": { "@badeball/cypress-cucumber-preprocessor/*": ["./node_modules/@badeball/cypress-cucumber-preprocessor/dist/bundler-utils/*"] } } }
-
Other changes:
-
Detect erroneous use of async / await and fail fast, relates to #903.
-
More precise snippet suggestions, fixes #974.
-
Report resolved configuration correctly, fixes #951.
-
Visualize hook filters properly, fixes #922.
-
Handle re-runs gracefully, fixes #944.
This version contains some significant changes to the implementation, specifically regarding Cucumber messages. The backend is now more stateful to handle corner cases. However, the backend is also less forgivable than before. Thus, I (the author) expect some issues to arise out of this. If you have found an issue with this version, please open up a ticket.
- Update dependency on
@badeball/cypress-configuration
, fixing an issue where specs in node_modules weren't ignored.
- Correct an issue inhibiting users of
type: module
-projects from using the diagnostics utility (#971).
- Correctly set
willBeRetried
non-retried tests, fixes #977.
-
Correctly set
willBeRetried
in messages reports, fixes #849. -
Replace cucumber-json-formatter with native components, relates to #795, #827, #870, #966 and #967.
-
This removes the need to install
cucumber-json-formatter
in order to generate JSON reports. -
This removes the options
json.formatter
andjson.args
, which are no longer relevant. With the native components, no child process is spawned. -
If you previously had configuredspecPattern
to equal**/*.feature
(or similar), then you should change it tocypress/e2e/**/*.feature
in order to not accidentally include feature files located innode_modules
. This will otherwise interfere with the calculation of the common ancestor path and thus step definition resolution.- This is no longer necessary as of v16.0.3.
-
-
Use deterministic, internal IDs, fixes #948 to some degree..
- Correctly escape injected values to glob patterns, fixes #946.
- Handle rescued test errors without self erroring, fixes #856.
- Ensure attachments are correctly added to HTML reports in case of retries, fixes #931.
- Limit the size of internal variables contained within the Cypress environment, fixes #908.
- Log hooks using log groups as well, fixes #922.
- Log steps and commands using log groups, fixes #796.
-
Drop support for Cypress v8.
-
Add support for Cypress v12.
-
Drop support for Cypress v7.
-
Add support for Cypress v11.
-
Better support for worlds in TypeScript, fixes #864.
-
Extended documentation, particularly in regards to pairing step definitions.
- Performance improvements to diagnostics.
- Correctly assign
testState.pickleStep
, fixes #836.
- Support absolute paths in
stepDefinitions
, fixes #832.
-
Add a very rudimentary way of diagnosing validity of steps, IE. whether each step is matching one, and only one, step definition, fixes #754.
-
Remove
And
andBut
from the public API, fixes #821. -
Output snippet suggestions upon missing step definition, fixes #799.
-
Total execution time is correctly shown in HTML reports, fixes #813.
-
Validate inclusion of
addCucumberPreprocessorPlugin()
insetupNodeEvents()
, fixes #820.
-
Start time and execution time is shown in HTML reports, fixes #798.
-
Add current step information to
window.testState
, fixes #800.
-
Allow overriding env using tags, fixes #792.
-
Correct some path handling on Windows, fixes #788.
-
Correct calculation of common ancestor path, even when specs are filtered, fixes #785.
Breaking changes:
- A minor change to step definitions has been introduced, affecting users of Cypress v10 or higher. When upgrading to v11.0.0 of the processor, users was instructed to remove certain prefixes from their step definitions. This is no longer required and said prefixes can be re-introduced when upgrading to v12.0.0 of the preprocessor. In other words, if your configuration looks like this
{
"stepDefinitions": [
"[filepath].{js,ts}",
"cypress/support/step_definitions/**/*.{js,ts}"
]
}
.. then it should now look like this (notice the addition of cypress/e2e
)
{
"stepDefinitions": [
"cypress/e2e/[filepath].{js,ts}",
"cypress/support/step_definitions/**/*.{js,ts}"
]
}
Note: Step definitions doesn't necessarily have to be put in cypress/e2e
and alongside your feature files. They can be contained in an entirely separate directory, if desired. This fixes #748.
Other changes:
-
Updated all
@cucumber/*
dependencies. -
Added native support for HTML reports using
@cucumber/html-formatter
, fixes #780. -
Correct an issue with non-array
stepDefinitions
, fixes #781.
- Expose member
getStepDefinitionPatterns
.
- Improve error message upon missing step definition, fixes #763.
-
Step definition with extension
.tsx
is picked up by default, paving the way for component testing. -
Added an example illustrating component testing with React + Webpack.
- Retried test would eventually yield "No commands were issued in the test", fixes #749.
- Enable configuring of JSON args, allowing for custom JSON formatters, fixes #742.
-
Enable
*.mjs
file extension by default, when looking for step definitions. -
Add a default export to
@badeball/cypress-cucumber-preprocessor/esbuild
. -
Add examples for CJS and ESM.
- Enable test configuration overrides, such as retrability of a single scenario, fixes #697.
Breaking changes:
- Dropped support for Cypress v6.
Other changes:
-
Added support for Cypress v10. 🎉
-
Untitled scenario outline no longer errors, fixes #731.
-
Outputting only messages is now possible, fixes #724.
-
Allow absolute output paths, partially fixes #736.
-
Output directories are automatically created recursively, partially fixes #736.
There's no changes to configuration options, but if your configuration looked like this pre-10
{
"stepDefinitions": [
"cypress/integration/[filepath].{js,ts}",
"cypress/support/step_definitions/**/*.{js,ts}"
]
}
.. then it should look like this post-10 (notice the removal of cypress/integration
)
{
"stepDefinitions": [
"[filepath].{js,ts}",
"cypress/support/step_definitions/**/*.{js,ts}"
]
}
- Allow integration folders outside of project root, fixes #719.
- Fixed an issue where internal calls to
cy.wrap
was being logged.
Breaking changes:
- Exported member
resolvePreprocessorConfiguration
now requires aprojectRoot
variable and aenvironment
variable.
Other changes:
- Configuration values can now be overriden using (Cypress-) environment variable.
- Fixed an issue with returning chainables from step definitions.
- Allow handlers to be omitted and attached explicitly, fixes #705 (undocumented, experimental and API is subject to change anytime).
- Fixed an issue where programmatically skipping a test would error.
- Fixed an issue where Before hooks would error.
- Add timestamps and durations to messages.
- Automatically skip tests marked with
@skip
.
- Correct types for
isFeature
anddoesFeatureMatch
.
- Prevent an error when
experimentalInteractiveRunEvents
is enabled.
- Fixed an issue where the preprocessor was throwing in interactive mode when JSON reports was enabled.
- Fixed an issue when running all specs.
Due to an publishing error from my side, this version is identical to v9.0.0.
This is the point where badeball's fork becomes the mainline and replaces TheBrainFamily's implementation. This implementation has been re-written from scratch in TypeScript, has more thorough test coverage and is filled with a bunch of new feature. Read more about the transfer of ownership here.
The changelog of the two ancestors can be found at