Giter Site home page Giter Site logo

b-yond-infinite-network / jest-cucumber-fusion Goto Github PK

View Code? Open in Web Editor NEW
16.0 19.0 7.0 2.2 MB

Write cucumber test the natural way but still have them part of a jest run (including coverage)

License: Apache License 2.0

JavaScript 66.79% Gherkin 33.21%
cucumber-test jest-tests cucumber-step scenario coverage jest cucumber

jest-cucumber-fusion's People

Contributors

albertaouad avatar bruno-morel avatar dependabot[bot] avatar j8kin avatar pjoe avatar stevensnoeijen avatar titi974 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jest-cucumber-fusion's Issues

Background support

Hi,

Gherkin Background keyword is very useful for avoiding repeating Given steps in features. It is supported in jest-cucumber. Any luck adding to jest-cucumber-fusion?

Thank you.

[Question] Can I execute one scenario only?

Scenario

I have a feature with one or more scenarios (let's call them X, Y an Z)
I'm developing a test suite
I want to add a new scenario: W
I want to execute only scenario W for faster development cycle

Problem

There's actually no way to tell jest to only run scenario W but temporary removing X, Y and Z from the feature file.

Basically, I'm missing the concept of scenario in my tests code. Using regular jest's describe I can isolate test cases during development (and even debug it). I'm looking for the same behaviour, but using cucumber-like test definitions.

Is it even possible?

language support

I'm trying to add tests in another language (than english) but this doesn't work.
I dived in this problem and came to the conclusion that this should be fixed in jest-cucumber: bencompton/jest-cucumber#107

Any thoughts?

Possibility of using semantic release ?

Describe the feature you'd like:

I would like to add semantic release (the way we are using for infinity-ui-lib. So the process for generating releases, change log is fully automated.

If this is something that you think will work, i can do a PR.

Can't use Regex StepDef With Table

Hi,
I am able to successfully use capture groups in regex stepdefs and separately gherkin tables in a different step def, but I can not use both in the same step def. This is something that is available in jest-cucumber, and so it's something I think should be supported here.

When I try the step def below, only the first parameter is given a value.

Then(/^a (\d+) result is returned from the endpoint&/, ((httpCode_CucumberInput: string, result_CucumberInput: string) => {
   ...
}))

Scenario examples are incorrectly parsed when using in step with tables

When Scenario Outline contains step with RegExp in Definition and using example value in Table at the same time then during execution example value is not substituted in step.
For example:

Scenario Outline: <description>
  Given Some step with <exampleValue> and use table:
     | field     | value          |
     | SomeField | <exampleValue> |

Examples:
    | exampleValue |
    | myValue      |

then during the execution scenario step contains: { field: 'SomeField', value: '<exampleValue>'} instead of { field: 'SomeField', value: 'myValue'}

Complex array reg exp do not work

Trying to use an array definition regex fails: ([(?: \d+(?: |, |,))+])

We should be able to do

 Scenario: Folding ourselves in 2D
    Given I am Elon Musk attempting to launch a rocket into space
    And  my position in 2D space is [ 0, 2 ]
    When I launch the rocket
    Then the rocket should end up in space

[Question] Multiple scenarios

First of all, nice stuff. I've been using BDD and cucumber for 5 years now and am a huge fan of the approach.

So, do you support multi-scenario feature files? if yes, what's the syntax?
Thanks.

Add support for jest-cucumber 3.0.0

jest-cucumber 2.0.0 does not support updated Gherkin syntax

Including Rule

Error parsing feature Gherkin: Parser errors:
    (34:5): expected: #EOF, #TableRow, #DocStringSeparator, #StepLine, #TagLine, #ScenarioLine, #ScenarioOutlineLine, #Comment, #Empty, got 'Rule: User must authenticate'

RegEx With Databale

Hello,
Happy New Year !

I added the possibility of having a sentence can be matched with regEx when it is a datatable.
It is useful in my project to have only one parameterizable sentence example:

[...]
Then I should see the following 2 todos in my list:
      | TaskName      | Priority |
      | Watch the cat | high     |
      | Registration  | high     |

and another Scanario

[...]
Then I should see the following 3 todos in my list:
      | TaskName      | Priority |
      | Watch the cat | high     |
      | Registration  | high     |
      | Journal       | high     |

It allows me to have only 1 sentence

Then(/^I should see the following (\d) todos in my list:$/, (param1, table) => {
   expect(table[0].TaskName).toBe('Watch the cat')
})

The datatable should always be the last parameter.

PR is Here: #18 (comment)

Non-outline expression bracket-enclosed (<>) with multiple words separated by a space

For standard scenario (non-outline) like this:

Feature: Rocket Launching

  Scenario: Launching a SpaceX rocket
    Given I am Elon Musk attempting to launch a rocket into space
    When I launch the '<personal rocket>'
    Then the rocket should end up in space
    And the booster(s) should land back on the launch pad
    But nobody should doubt me ever again

The 2d steps will be broken and fail execution everytime.!

Ability to find and load all feature files and to define steps independently from feature file paths

Similarly to https://github.com/TheBrainFamily/cypress-cucumber-preprocessor and https://github.com/sjmeverett/gherkin-jest , I would like to have the capability of loading all features files by the testing framework, as well as the ability of reusing steps across features so they only need to be implemented once.

This library however, makes feature files dependent on where they come from. Because we export our features from an bug tracking system from time to time, I find it inconvenient that I have to hardcode the feature file paths.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.