cypress-cucumber-preprocessor: Cucumber report is missing when visit another site
Current behavior
cucumber-report.json
[
{
"description": "",
"elements": [
{
"description": "",
"id": "searchengine;visiting-the-frontpage;;4",
"keyword": "Scenario Outline",
"line": 10,
"name": "visiting the frontpage",
"steps": [
{
"keyword": "When ",
"line": 3,
"name": "I visit http://google.com",
"result": {
"duration": 1626000000,
"status": "passed"
},
"match": {
"location": "not available:0"
}
},
{
"keyword": "Then ",
"line": 4,
"name": "I should see a search bar",
"result": {
"duration": 79000000,
"status": "passed"
},
"match": {
"location": "not available:0"
}
}
],
"type": "scenario"
},
{
"description": "",
"id": "searchengine;visiting-the-frontpage;;5",
"keyword": "Scenario Outline",
"line": 11,
"name": "visiting the frontpage",
"steps": [
{
"keyword": "When ",
"line": 3,
"name": "I visit http://google.com",
"result": {
"duration": 840000000,
"status": "passed"
},
"match": {
"location": "not available:0"
}
},
{
"keyword": "Then ",
"line": 4,
"name": "I should see a search bar",
"result": {
"duration": 84000000,
"status": "passed"
},
"match": {
"location": "not available:0"
}
}
],
"type": "scenario"
}
],
"id": "searchengine",
"keyword": "Feature",
"line": 1,
"name": "SearchEngine",
"uri": "features/search.feature"
}
]
Desired behavior
From my code, result of “http://duckduckgo.com” should be in json and ndjson.
Test code to reproduce
search.feature
Feature: SearchEngine
Scenario Outline: visiting the frontpage
When I visit <site>
Then I should see a search bar
Examples:
| site |
| http://duckduckgo.com |
| http://duckduckgo.com |
| http://google.com |
| http://google.com |
search.step.js
const { When, Then } = require("@badeball/cypress-cucumber-preprocessor");
When("I visit {}", (site) => {
cy.visit(site);
});
Then("I should see a search bar", () => {
cy.get("input").should("be.visible");
});
Versions
- Cypress version: 12.5.1
- Preprocessor version: 15.1.3
- Node version: 18.9.0
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (3 by maintainers)
Commits related to this issue
- Add a test case illustrating #944 — committed to badeball/cypress-cucumber-preprocessor by badeball a year ago
- Refactor everything about Cucumber messages Messages are no longer lingering in the runtime, but passed along to the backend using tasks immediately. This is a prerequisite for the following issues: ... — committed to badeball/cypress-cucumber-preprocessor by badeball a year ago
- Refactor everything about Cucumber messages Messages are no longer lingering in the runtime, but passed along to the backend using tasks immediately. This is a prerequisite for the following issues: ... — committed to badeball/cypress-cucumber-preprocessor by badeball a year ago
- Refactor everything about Cucumber messages Messages are no longer lingering in the runtime, but passed along to the backend using tasks immediately. This is a prerequisite for the following issues: ... — committed to badeball/cypress-cucumber-preprocessor by badeball a year ago
- Handle re-runs gracefully This fixes #944 [1]. It also makes use of findLastIndex, thus bumping the Node requirement up to v18 or above. [1] https://github.com/badeball/cypress-cucumber-preprocessor... — committed to badeball/cypress-cucumber-preprocessor by badeball a year ago
- Refactor everything about Cucumber messages Messages are no longer lingering in the runtime, but passed along to the backend using tasks immediately. This is a prerequisite for the following issues: ... — committed to badeball/cypress-cucumber-preprocessor by badeball a year ago
This will likely depend on whether this is answered: https://github.com/cypress-io/cypress/issues/26613.