-
Notifications
You must be signed in to change notification settings - Fork 20
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
cypress-tags doesn't work as described #21
Comments
It worked for me when I tried in my project. I think you have to pass the |
Hi @JonCook - as @subhanKhalid says you will need to pass in the environment variables before running Cypress. So in your case you could run:
I will look into why the variables are not being picked up by the |
Hi - according to the Cypress docs (https://docs.cypress.io/guides/guides/environment-variables) you cannot set OS-level env vars via the
Therefore I'll close this issue as you need to set the env var before calling Cypress using the example given in my previous comment. |
I think this may be an issue with how they have it configured on their project, I'm running into a similar error message while running my tests, but I'm getting my env var first. It looks like it may not be picking up the typings correctly, as it's complaining about the arguments passed to
I have a feeling it might be that I need to combine them into one, which I'll try and report back, but that could be this user's issue, as well, something is getting muddled with the typescript processing between this plugin and any others that they may be using. |
Hello, I am having the same issue. Cypress runner is picking up all the spec files and failing with error mentioned by @JonCook |
Running into the same issue
This is my
This is the only plugin I have installed;
|
@peterjaap Can you share your test code? Have you tried running some of the examples in either the |
@annaet Seeing exactly the same error:
Versions: cypress.config.js file changes:
Added an empty tsconfig.json file at the root directory TestCase:
I get the same error, if I move the tagging to suite level instead of test case level |
I found my problem, maybe it's the same for you @DiwanD03. My problem was that I forgot to 'enable' the cypress-tags module in
So it didn't enable cypress-tags and thus expected a string (the test name) but got an object (the tags). |
@DiwanD03 The
And then your eg.
Can you try that and see if it helps? |
Hi @peterjaap, I have enabled cypress-tags module in |
Hi @annaet, tried above changes that you suggested. Getting below error with this: Code Snippet:
|
Ah you'll still need to use a require statement then. Try |
@annaet
|
@DiwanD03 I'm not sure what else to suggest as that should be all that's needed to transform your test files. Are you using TypeScript? You should be able to reference the types using in your
|
@annaet I am using js rather than typescript as base for the framework. For easier debugging, I tried using tags on both two versions of Cypress. Below are the details of each: <title></title> <style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Helvetica Neue'} table.t1 {border-collapse: collapse} td.td1 {border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #9a9a9a #9a9a9a #9a9a9a #9a9a9a; padding: 1.0px 5.0px 1.0px 5.0px} </style>
|
Have added below in my spec file already.
It doesn't help. Have used basic Cypress scaffold tests above to depict the issue, as actual code cannot be shared here. |
Thanks for the example, I will take a look at this. |
Hi @DiwanD03 - I've run both your provided examples and they both work for me. For the non-working version I changed I can also confirm that it works for me when an include filter is provided. |
Interesting. It now worked for me too. I replaced the above suggested Thank you @annaet for the resolution and diligent follow up. |
=========================================================================== Please help me below issue, Currently, I'm facing a similar issue in my project , when I try to implement the tags concept. please find the error message below. Cypress- Config file |
@SubramanyamPalla npx cypress run --env CYPRESS_INCLUDE_TAGS=Smoke |
Hello, this sounded like a nice little project, but it just doesn't work 👎
When I run my tests eg.
npx cypress run --env baseUrl=http://soar.esac.esa.int/soar CYPRESS_INCLUDE_TAGS=SOARTEST-32
Gives me an error:
I believe my spec is defined correctly:
Thanks for any help
The text was updated successfully, but these errors were encountered: