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

Connection of two feature files without reusing #331

Open
pushkalaP opened this issue Jan 4, 2018 · 1 comment
Open

Connection of two feature files without reusing #331

pushkalaP opened this issue Jan 4, 2018 · 1 comment

Comments

@pushkalaP
Copy link

I'm submitting a ... (check one with "x")

[ ] bug report
[ ] feature request
[X ] support request => Please do not submit support request here, instead use [Stack Overflow](https://stackoverflow.com/questions/tagged/nightwatch.js+cucumber)

Current behavior

Expected/desired behavior

Can we create two feature files having one step definition file included?

Or
How can we connect the below example of facebook scenario :
a) Login in with valid credentials (1 feature file, 1 step def file (.js))
b) click on my profile (view your profile) and change my cover photo ( 1 feature file, 1 step def file (.js))

Expected : I want my webpage to be open and wanted to trigger continution of 'b' scenario

Below is my question:

  1. how do we connect 'a' and 'b' scenario without reusing the 'a' feature files/step def files and connect the 'b' feature files

Please let me know if anyone had implemented this scenario

Reproduction of the problem
Please create a minimal demo application where the issue can be reproduced. You can upload it to your GitHub account or attach it as ZIP archive (please make sure you exclude the node_modules folder from the archive). As a base you can use the nightwatch-example repository.

What is the motivation / use case for changing the behavior?

Please tell us about your environment:
In case of a bug report please provide the following information:

  • output of the following command from your project root npm ls nightwatch cucumber nightwatch-cucumber && node --version
  • output of running nightwatch with --verbose flag
@clayreimann
Copy link

It sounds like you might be looking for background steps. You can use the to provide a shared setup for your tests. AFAIK gherkin doesn't provide any syntax for linking feature files together, and doing so is probably an anti-pattern.

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

No branches or pull requests

2 participants