Closed oleghansen closed 3 years ago
Hi @oleghansen
For the plugin to work, you must use npx cypress-ntlm open
(or npx cypress-ntlm run
). If you just start cypress, the environment is not setup and you will get the error posted.
In my own test setup, cucumber works fine with the plugin. Your setup looks correct, the only difference is that I have not set the "testFiles" property in cypress.json. I do see both .spec.js
files and .feature
files in cypress, and I guess the intent of that property is to only show feature files. Try running with cypress-ntlm with the "testFiles" property removed. If the .feature
files works in that scenario, please troubleshoot the "testFiles" setting.
I noted that the setting recommended by the cucumber preprocessor docs is "testFiles": "**/*.feature"
Please run the npx cypress-ntlm open command from the project root folder (the e2e folder in your case).
On Wed, Oct 14, 2020 at 7:37 AM oleghansen notifications@github.com wrote:
Thanks for your reply. Unfortunately this didn't work as expected. Another strange thing that happened is that another set of cypress-files/folders are created when I run npx cypress-ntlm-open : [image: image] https://user-images.githubusercontent.com/3908524/95948024-0f9a1380-0df0-11eb-9d41-505daf28772b.png
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bjowes/cypress-ntlm-auth/issues/137#issuecomment-708168612, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCHR3FTGM47KNSGYWGH3YLSKU2JNANCNFSM4SO6ROYQ .
Thank you for your quick replies. Adding "testFiles": "**/*.feature"
did the trick. I had that originally but must have tried to switch it out to "testFiles": "**/*.{feature,features}"
when it didn't pick up feature files as expected, but that was probably just me running from cypress folder and not the root folder. Thanks!
Hi, I set up a project recently where I'll be using cucumber and cypress-ntlm-auth. I'm getting this error when running a simple test:
As I understood from the update to 3.0.0 I'm not supposed to need anything special in
support/index.js
. I imagined I could solve the problem by using the commandnpx cypress-ntlm open
. I do use .feature files and when I try to use the commandnpx cypress-ntlm open
ornpx ntlm-proxy
the .feature files are not picked up, only the spec-files in integration/example. Trying the (outdated, as I've understood) approach, adding ntmlAuth inplugins/index.js
doesn't seem to be valid anymore.I'd like to be able to run with authentication either by 1) simply by running yarn cypress open or 2) with npx cypress-ntlm open, but then I'd need the .feature files to be picked up. These are my files:
support/index.js:
plugins/index.js (after removing ntlm-related-stuff):
cypress.json