cypress-image-snapshot
cypress-image-snapshot copied to clipboard
e2eSpecDir but for component testing
Hello, there should be also option to set folder for component testing for that we get the same issue that is creates long nested folders. Could you please add the option for component testing? Cheers
Hey,
I did discuss that here - https://github.com/simonsmith/cypress-image-snapshot/pull/8#issuecomment-1645391607
What issue are you seeing? In my tests I did not see any folder repeating (like cypress/e2e/ twice) when doing component tests
I would want to have less nested folders, generated full path gets quite long, it would generate ...\cypress\snapshots\cypress\components\DateFilter.cy.tsx\DateFilter\ -- allows to select custom range.png\ -- allows to select custom range.snap.png
while I could easily imagine it shorter without "cypress\components" part also it part "-- allows to select custom range.snap.png" gets repeated
Might not be related but I also get "EISDIR: illegal operation on a directory, read" when I reran test through cypress open even though cypress run works fine. I assumed it is because of the long paths but might be something else.
EISDIR: illegal operation on a directory, read
at Object.readSync (node:fs:738:3)
at Object.
alternatively I get sometimes different error EPERM: operation not permitted, copyfile 'C:\Dev\project\cypress\snapshots\cypress\components\Buttons.cy.tsx\ButtonGroup\ -- shows correctly.snap.png' -> 'C:\Dev\project\cypress\snapshots\cypress\components\Buttons.cy.tsx\ButtonGroup\ -- shows correctly.png'
at Promise.longStackTracesCaptureStackTrace [as _captureStackTrace] (http://localhost:4000/__cypress/runner/cypress_runner.js:3486:19) at Promise._then (http://localhost:4000/__cypress/runner/cypress_runner.js:1239:17) at Promise._passThrough (http://localhost:4000/__cypress/runner/cypress_runner.js:4110:17)
These errors appear after I do cypress run for all spec files and then run a single spec file after with cypress open, this makes the package unusable.
Might be ideal if you can create a separate issue with steps/example repo I can use to recreate that issue as I've not seen it. I also don't use windows so could be platform specific
No activity