You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use cypress@9.2.1 and cypress-image-diff-js@1.16.1.
I have a simple integration test in landing-page.spec.ts:
describe('The landing page',()=>{it('is possible to make visual regression tests',()=>{cy.visit('/');cy.get('.container').compareSnapshot('landing-page',0.1);});});
Bug description
If I start cypress via cypress run I get a screenshot with the name landing-page.spec.ts-landing-page.png.
If I start cypress via cypress open and click on Run 1 integration spec the resulting screenshot name is All Integration Specs-landing-page.png.
Cypress.spec.name doesn't seem to be the correct way to get the filename of the test
there are more file endings than just .js
There also seems to be Cypress.currentTest.titlePath.
The solution from cypress-plugin-snapshots seems to also not rely on the file name of the tests, but the describe blocks? - No it seems to have the same problem.
Setup
I use
cypress@9.2.1
andcypress-image-diff-js@1.16.1
.I have a simple integration test in
landing-page.spec.ts
:Bug description
If I start cypress via
cypress run
I get a screenshot with the namelanding-page.spec.ts-landing-page.png
.If I start cypress via
cypress open
and click onRun 1 integration spec
the resulting screenshot name isAll Integration Specs-landing-page.png
.Some quick thoughts
I guess the relevant code is here
There are two issues:
Cypress.spec.name
doesn't seem to be the correct way to get the filename of the test.js
There also seems to be
Cypress.currentTest.titlePath
.The solution from cypress-plugin-snapshots seems to also not rely on the file name of the tests, but the- No it seems to have the same problem.describe
blocks?The text was updated successfully, but these errors were encountered: