Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json formatter with empty scenarios report a background but not scenario #1530

Closed
aurelien-reeves opened this issue Apr 30, 2021 · 1 comment
Labels
🐛 bug Defect / Bug
Milestone

Comments

@aurelien-reeves
Copy link
Contributor

aurelien-reeves commented Apr 30, 2021

Feature: minimal
  Scenario can be empty.
  Background and hooks are not executed.
  The state of the scenario is `undefined`
  
  Background:
    Given a background step

  Scenario: empty

bundle exec cucumber -f json

Actual

[
  {
    "description": "  Scenario can be empty.\n  Background and hooks are not executed.\n  The state of the scenario is `undefined`",
    "elements": [
      {
        "description": "",
        "keyword": "Background",
        "line": 6,
        "name": "",
        "type": "background"
      }
    ],
    "id": "minimal",
    "keyword": "Feature",
    "line": 1,
    "name": "minimal",
    "uri": "features/empty-scenario/empty-scenario.feature"
  }
]

Expected

[
  {
    "description": "  Scenario can be empty.\n  Background and hooks are not executed.\n  The state of the scenario is `undefined`",
    "elements": [
      {
        "id": "minimal;empty",
        "keyword": "Scenario",
        "line": 9,
        "name": "empty",
        "steps": [],
        "type": "scenario"
      }
    ],
    "id": "minimal",
    "keyword": "Feature",
    "line": 1,
    "name": "minimal",
    "uri": "features/empty-scenario/empty-scenario.feature"
  }
]
@aurelien-reeves aurelien-reeves added the 🐛 bug Defect / Bug label Apr 30, 2021
@aurelien-reeves
Copy link
Contributor Author

Refs. cucumber/common#1498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Defect / Bug
Projects
None yet
Development

No branches or pull requests

2 participants