Skip to content

Commit

Permalink
Extend test coverage of pretty output
Browse files Browse the repository at this point in the history
This is in preparation of upcoming changes.
  • Loading branch information
badeball committed Jan 8, 2024
1 parent 29533f7 commit 231740d
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions features/pretty_output.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,68 @@ Feature: pretty output
Given a step
"""

Scenario: multiple, passing scenarios
Given a file named "cypress/e2e/a.feature" with:
"""
Feature: a feature name
Scenario: a scenario name
Given a step
Scenario: another scenario name
Given another step
"""
And a file named "cypress/support/step_definitions/steps.js" with:
"""
const { Given } = require("@badeball/cypress-cucumber-preprocessor");
Given("a/another step", function() {});
"""
When I run cypress
Then it passes
And the output should contain
"""
Feature: a feature name # cypress/e2e/a.feature:1
Scenario: a scenario name # cypress/e2e/a.feature:2
Given a step
Scenario: another scenario name # cypress/e2e/a.feature:4
Given another step
"""

Scenario: multiple, passing features
Given a file named "cypress/e2e/a.feature" with:
"""
Feature: a feature name
Scenario: a scenario name
Given a step
"""
Given a file named "cypress/e2e/b.feature" with:
"""
Feature: another feature name
Scenario: another scenario name
Given another step
"""
And a file named "cypress/support/step_definitions/steps.js" with:
"""
const { Given } = require("@badeball/cypress-cucumber-preprocessor");
Given("a/another step", function() {});
"""
When I run cypress
Then it passes
And the output should contain
"""
Feature: a feature name # cypress/e2e/a.feature:1
Scenario: a scenario name # cypress/e2e/a.feature:2
Given a step
"""
And the output should contain
"""
Feature: another feature name # cypress/e2e/b.feature:1
Scenario: another scenario name # cypress/e2e/b.feature:2
Given another step
"""

Scenario: scenario with rule
Given a file named "cypress/e2e/a.feature" with:
"""
Expand Down

0 comments on commit 231740d

Please # to comment.