Closed raisapirgari closed 3 years ago
I'm not able to access the repository you're referring to.
Thanks for the report, please make the repository public, I get 404 when I try to access. I also see you are using windows, are you sure this worked on windows before? There are some hardcoded paths with "/" in the cypress-tags script, which might be causing issues
@badeball @lgandecki thanks for such a quick response. Unfortunately I can't make the repository public, but I can provide everything you need. Also I'm sure it worked before, unless some mistakes were made, I tried to review everything that was changed and before that we had even cucumber reports generated based on tags. Also when trying to run basic script with no configs it fails with same error:
In case you can guide me to direction this error is coming from it, it will help a lot.
Thanks in advance.
Unfortunately I can't make the repository public, but I can provide everything you need.
What we need is a way to reproduce the issue locally, preferably with a repository we can clone. I understand that you can't share intellectual property with us, but you need to condense the problem into something that's free of that, minimal, and can be shared.
it looks like it might be this line failing:
const spec = ${fs.readFileSync(featurePath)}
;
and that probably means that the featurePath points to a directory. could you maybe change the cypress-tags.js file and do:
const paths = glob
.sync(specGlob, {
nodir: true,
ignore: usingCypressConf ? ignoreGlob : "",
})
.filter((pathName) => pathName.endsWith(".feature"));
console.log("paths", paths)
and see whether all the paths are files, not directories? Another thing to check - do you have any folders that end with .feature ?
Guys @badeball @lgandecki many many thanks, in my case is was a folder with .feature extension:
Current behavior
Error returned when running scenarios with cypress-tags:
Desired behavior
Till few days ago I was able to run E2E client side scenarios with above scripts, but after enriching tests with more API tests, cypress-tags is not working at all. At the same time I am able to run scenarios in browser runner and this means that scenarios are 'heathy and correct' and I should be able to run scenarios also from command line with tag selector
Test code to reproduce
repository to be cloned: https://github.com/CreditPlace/automation.git
Versions
"dependencies": { "cypress-downloadfile": "^1.2.0", "cypress-get-table": "^1.0.1", "cypress-tags": "0.0.21", "randomstring": "^1.1.5" },"devDependencies": { "cypress": "^7.1.0", "cypress-cucumber-preprocessor": "^2.5.5", "cypress-file-upload": "^4.1.1", "cypress-log-to-output": "^1.1.2", "cypress-multi-reporters": "^1.4.0", "mocha": "^8.3.0", "mochawesome": "^6.2.1", "mochawesome-merge": "^4.2.0", "mochawesome-report-generator": "^5.1.0", "npm-run-all": "^4.1.5" }