Skip to content

Latest commit

 

History

History
532 lines (293 loc) · 21.5 KB

CHANGELOG.md

File metadata and controls

532 lines (293 loc) · 21.5 KB

Changelog

All notable changes to this project will be documented in this file.

v20.1.0

  • Include skipped (not omitted) tests in reports, fixes #1041.

v20.0.7

  • Updated all dependencies, fixes #1198.

v20.0.6

  • Search for configuration files using strategy project, fixes #1185.

v20.0.5

  • Updated all dependencies, fixes #1180.

v20.0.4

  • Fix type signature of defineParameterType to correctly reflect transformer property's optionality, fixes #1179.

v20.0.3

  • Handle browser / page crash gracefully, fixes #1172.

v20.0.2

  • Add support for skipped / pending scenario hooks, fixes #1159.

  • Add support for suite-level test configuration, fixes #1158.

v20.0.1

  • Handle more corner cases related to reload-behavior, fixes #1142.

v20.0.0

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(..) and Before(..).

    • It now more closely mimic the behavior of AfterStep(..), which it was supposed to.
  • The above-mentioned onAfterStep hook, is no longer invoked with a wasLastStep 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.

v19.2.0

  • 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.

v19.1.1

  • 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.

v19.1.0

  • Add BeforeAll(..) and AfterAll(..) hooks, fixes #758.

v19.0.1

  • Fix type members to account for scenario hook names, fixes #1113.

v19.0.0

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.

Other changes:

  • Scenario hooks (Before(..) and After(..)) 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.

v18.0.6

  • Make the compile output play nicer with ESM, relates to #1093.

  • Allow visiting unconfigured domains in before hooks, fixes #1091.

v18.0.5

  • Add support for Cypress v13, fixes #1084.

v18.0.4

  • Update dependency on esbuild, fixes #1068.

v18.0.3

  • Allow (testing) type-specific configuration of stepDefinitions, fixes #1065.

v18.0.2

  • 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.

v18.0.1

  • Give each TestStep (from @cucumber/messages) a unique ID, fixes #1034.

v18.0.0

Breaking changes:

  • TypeScript users that have previously been unable to upgrade moduleResolution to node16, and use the paths 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:

v17.2.1

  • 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.

v17.2.0

  • Add BeforeStep and AfterStep hooks, fixes #847.

  • Report failing steps with correct duration, fixes #963.

v17.1.1

  • 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.

v17.1.0

  • 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).

v17.0.0

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 to node16 in your tsconfig.json depending on what parts of the package you use (assuming you're using TypeScript).

    • TypeScript users that are unable to upgrade moduleResolution to node16, can use the paths 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.

v16.0.3

  • Update dependency on @badeball/cypress-configuration, fixing an issue where specs in node_modules weren't ignored.

v16.0.2

  • Correct an issue inhibiting users of type: module -projects from using the diagnostics utility (#971).

v16.0.1

  • Correctly set willBeRetried non-retried tests, fixes #977.

v16.0.0

  • 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 and json.args, which are no longer relevant. With the native components, no child process is spawned.

    • If you previously had configured specPattern to equal **/*.feature (or similar), then you should change it to cypress/e2e/**/*.feature in order to not accidentally include feature files located in node_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..

v15.1.5

  • Correctly escape injected values to glob patterns, fixes #946.

v15.1.4

  • Handle rescued test errors without self erroring, fixes #856.

v15.1.3

  • Ensure attachments are correctly added to HTML reports in case of retries, fixes #931.

v15.1.2

  • Limit the size of internal variables contained within the Cypress environment, fixes #908.

v15.1.1

  • Log hooks using log groups as well, fixes #922.

v15.1.0

  • Log steps and commands using log groups, fixes #796.

v15.0.0

  • Drop support for Cypress v8.

  • Add support for Cypress v12.

v14.0.0

  • Drop support for Cypress v7.

  • Add support for Cypress v11.

v13.1.0

  • Better support for worlds in TypeScript, fixes #864.

  • Extended documentation, particularly in regards to pairing step definitions.

v13.0.3

  • Performance improvements to diagnostics.

v13.0.2

  • Correctly assign testState.pickleStep, fixes #836.

v13.0.1

  • Support absolute paths in stepDefinitions, fixes #832.

v13.0.0

  • 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 and But from the public API, fixes #821.

  • Output snippet suggestions upon missing step definition, fixes #799.

v12.2.0

  • Total execution time is correctly shown in HTML reports, fixes #813.

  • Validate inclusion of addCucumberPreprocessorPlugin() in setupNodeEvents(), fixes #820.

v12.1.0

  • Start time and execution time is shown in HTML reports, fixes #798.

  • Add current step information to window.testState, fixes #800.

v12.0.1

  • 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.

v12.0.0

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.

v11.5.1

  • Expose member getStepDefinitionPatterns.

v11.5.0

  • Improve error message upon missing step definition, fixes #763.

v11.4.0

  • 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.

v11.3.1

  • Retried test would eventually yield "No commands were issued in the test", fixes #749.

v11.3.0

  • Enable configuring of JSON args, allowing for custom JSON formatters, fixes #742.

v11.2.0

  • 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.

v11.1.0

  • Enable test configuration overrides, such as retrability of a single scenario, fixes #697.

v11.0.0

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.

Upgrading to Cypress v10

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}"
  ]
}

v10.0.2

  • Allow integration folders outside of project root, fixes #719.

v10.0.1

  • Fixed an issue where internal calls to cy.wrap was being logged.

v10.0.0

Breaking changes:

  • Exported member resolvePreprocessorConfiguration now requires a projectRoot variable and a environment variable.

Other changes:

v9.2.1

  • Fixed an issue with returning chainables from step definitions.

v9.2.0

  • Allow handlers to be omitted and attached explicitly, fixes #705 (undocumented, experimental and API is subject to change anytime).

v9.1.3

  • Fixed an issue where programmatically skipping a test would error.

v9.1.2

  • Fixed an issue where Before hooks would error.

v9.1.1

  • Add timestamps and durations to messages.

v9.1.0

  • Automatically skip tests marked with @skip.

v9.0.5

  • Correct types for isFeature and doesFeatureMatch.

v9.0.4

  • Prevent an error when experimentalInteractiveRunEvents is enabled.

v9.0.3

  • Fixed an issue where the preprocessor was throwing in interactive mode when JSON reports was enabled.

v9.0.2

  • Fixed an issue when running all specs.

v9.0.1

Due to an publishing error from my side, this version is identical to v9.0.0.

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