TestArmada / magellan-nightwatch-plugin

Magellan plugin to provide Nightwatch.js support
MIT License
11 stars 15 forks source link

Magellan cannot find tests in subfolders #23

Closed joewdriver closed 6 years ago

joewdriver commented 6 years ago

Hello,

Magellan seems to be unable to find tests in subdirectories.

I have a tests directory and an accounts subdirectory. If I simply run:

./node_modules/.bin/magellan --seleniumgrid_browsers=chrome,firefox

It will only detect the tests in the top level tests folder. If I add "-g tests/account" to this command, it will not find any tests at all. Additionally if I run the command with "--test account/test/mytest.js" it cannot find the specific test case.

If I instead use nightwatch to run this without using magellan, it has no trouble finding the tests. Relevant Output:

[INFO] [Nightwatch Plugin] test iterator found nightwatch configuration at: ./nightwatch.json [INFO] [Nightwatch Plugin] Scanning tests for test files ... [INFO] [Nightwatch Plugin] Found 2 test files in tests [INFO] [Nightwatch Plugin] Using group filter: tests/Account/ [INFO] [Magellan] Error: no tests found

If I go into my nightwatch.json and specify every subfolder as a src_folder then magellan can locate them. That said, it seems that this should not be necessary, since Nightwatch on its own can locate all the subfolders without being explicitly stated.

archlichking commented 6 years ago

You need to specify every subfolder in the src_folders in nightwatch.json. There is no recursive search logic in the plugin.