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

ignoreTestFiles is ignored when passed from cli #1696

Closed
Sergeon opened this issue May 9, 2018 · 8 comments

Comments

7 participants
@Sergeon
Copy link

commented May 9, 2018

Current behavior:

When invoking cypress with config ignoreTestFiles=*blob from the command line, specs that match the blob aren't ignored. For instance, this npm command:

"cypress:run": "cypress run --config ignoreTestFiles=*.demo.js"

Will make a spec.demo.js to run, when it should be ignored.

Desired behavior:

Files that match the ignoreTestFiles parameter should be ignored.

Steps to reproduce:

I set up a test-tiny-repo clone with a demo of the issue. The branch is called ignore-test-files-cli-issue. You can find the repo here.

The readme has all the instructions.

Versions:

Mac Os: 10.13.4
Cypress: 2.1

@ValerieThoma

This comment has been minimized.

Copy link

commented May 9, 2018

Thank you for taking the time to provide this excellent example.
I was able to reproduce what you described.
Passing ignoreTestFiles as a CLI argument does not work as the documentation suggests: cypress-io/cypress-documentation#535
We believe this is a bug.

@brian-mann

This comment has been minimized.

Copy link
Member

commented Aug 2, 2018

You need to quote ignoreTestFiles.

"cypress:run": "cypress run --config ignoreTestFiles='*.demo.js'"

Whenever you use a bare glob from the command line, by default the terminal will attempt to expand it and it will not work.

Also, I don't believe your glob is right anyway. It should likely be **/*.demo.js since it will be passed the absolute path.

@Sergeon

This comment has been minimized.

Copy link
Author

commented Aug 2, 2018

Hi @brian-mann, thank you for your suggestion.

However, both


"cypress:run": "cypress run --config ignoreTestFiles='*.demo.js'"

And:

"cypress:run": "cypress run --config ignoreTestFiles='**/*.demo.js'"

Still run the demo spec. I updated the demonstration repo with the new npm commands.

@felixkempf

This comment has been minimized.

Copy link

commented Apr 17, 2019

This issue unfortunately still exists in cypress 3.2.0

Also I found it rather confusing that even when successfully configuring ignoreTestFiles via config file and running cypress:open, the configured ignoreTestFiles are not shown under "Settings > Configuration".

@jennifer-shehane

This comment has been minimized.

Copy link
Member

commented Apr 18, 2019

I think this PR may fix this issue #3880 Can anyone verify?

@brianmcgue

This comment has been minimized.

Copy link
Contributor

commented Apr 18, 2019

#3880 does seem to fix this issue for me.

@cypress-bot

This comment has been minimized.

Copy link

commented May 24, 2019

The code for this is done in cypress-io/cypress#3880, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot

This comment has been minimized.

Copy link

commented Jun 27, 2019

Released in 3.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.