You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { defineConfig } from "cypress";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import { createEsbuildPlugin } from "@badeball/cypress-cucumber-preprocessor/esbuild";
export default defineConfig({
e2e: {
specPattern: "**/*.feature",
async setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
): Promise<Cypress.PluginConfigOptions> {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await addCucumberPreprocessorPlugin(on, config);
state.messages.current.findLastIndex is not a function
This is answered in the FAQ.
As for the following error:
Expected there to be a timestamp for current step (this might be a bug, please report at https://github.com/badeball/cypress-cucumber-preprocessor)
.. you need to provide a reproducible example and not just snippets of what information you think is relevant.
Hi @badeball I am having this issue with when you run the command -e.g. npm run test or npx cypress run -e TAGS='@home' --headed .
The test only runs from the Cypress dashboard with npx cypress open.
CypressError:
cy.task('cypress-cucumber-preprocessor:test-case-started')
failed with the following error:https://on.cypress.io/api/task
Error: Expected there to be a timestamp for current step (this might be a bug, please report at https://github.com/badeball/cypress-cucumber-preprocessor)
Because this error occurred during a after each hook we are skipping the remaining tests in the current suite:
An error was thrown in your plugins file while executing the handler for the after:spec event.
The error we received was:
node version 17.5.0
I am using the following
package.json.
{
"name": "xx",
"version": "1.0.0",
"description": "xx",
"main": "index.js",
"scripts": {
"remove-cucumber-json-formatter": "rm -f tools/cucumber-json-formatter",
"download-cucumber-json-formatter": "curl -L https://github.com/cucumber/cucumber-json-formatter/releases/download/vX.Y.Z/cucumber-json-formatter-linux-amd64 -o tools/cucumber-json-formatter && chmod +x tools/cucumber-json-formatter",
"full_regression": "npm run download-cucumber-json-formatter && npx cypress run -e TAGS='@home' --headed && node cucumber-html-report.js; npm run remove-cucumber-json-formatter"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@badeball/cypress-cucumber-preprocessor": "^20.1.0",
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.1",
"cypress": "^13.12.0",
"multiple-cucumber-html-reporter": "^3.6.2",
"ts-loader": "^9.5.1"
},
"cypress-cucumber-preprocessor": {
"stepDefinitions": "cypress/support/step_definitions/**/*.js",
"html": {
"enabled": true,
"output": "cypress/reports/cucumber-html/cucumber-report.html"
},
"json": {
"enabled": true,
"formatter": "cucumber-json-formatter",
"output": "cypress/reports/cucumber-json/cucumber-report.json"
}
}
}
CYPRESS.CONFIG.ts
import { defineConfig } from "cypress";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import { createEsbuildPlugin } from "@badeball/cypress-cucumber-preprocessor/esbuild";
export default defineConfig({
e2e: {
specPattern: "**/*.feature",
async setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
): Promise<Cypress.PluginConfigOptions> {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
);
// Make sure to return the config object as it might have been modified by the plugin.
return config;
},
},
});
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).The text was updated successfully, but these errors were encountered: