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

Group doesn't work with multiple source folders #1069

Closed
mdharamadas opened this issue Jul 14, 2016 · 2 comments
Closed

Group doesn't work with multiple source folders #1069

mdharamadas opened this issue Jul 14, 2016 · 2 comments

Comments

@mdharamadas
Copy link

I have src_folders defined as below with multiple folder paths. Each of these folders in turn have folders like functional, api, etc.

{
  "src_folders": ["tests/home", "tests/login", "tests/register"],
  ...
}

I can successfully run all tests (without specifying --group) but cannot run tests with groups like below. NigthWatch doesn't consider src_folders if groups are specified.

./nightwatch --group functional -e chrome

@senocular
Copy link
Contributor

senocular commented Jul 15, 2016

This is a weird one. If you use multiple test paths and then include a group, what you end up with is a test path that uses the group rather than src_folders. So given OP's config and a structure like:

root/
+- nightwatch.json
+- tests/
|  +- home/
|  +- login/
|  +- register/
+- functional/

the tests in root/functional get run.

The code calls out to the fact that it only works with one src_folders, but I'm not sure why first condition returns the group as the src path when there are more than one specified.

https://github.com/nightwatchjs/nightwatch/blob/master/lib/runner/cli/clirunner.js#L256

I have a feeling this is something our team will run into as well. I'll work on submitting a patch for it. It shouldn't be too hard.

@mdharamadas
Copy link
Author

Thanks for taking care of this!

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

No branches or pull requests

3 participants