Coder Social home page Coder Social logo

Comments (4)

Zaista avatar Zaista commented on June 11, 2024

Thanks for raising this issue. Is there any specific need to have this behavior the same as in v3? Because with Cypress' specPattern option it's difficult to predict the location of spec files, hence the base folder was used with no nesting.

In hindsight, the thing I obviously missed is to make this visible for users who upgrade.

from cypress-visual-regression.

TomaszG avatar TomaszG commented on June 11, 2024

Personally, I don't, I can live with that :) However, I can imagine a scenario where one has the same spec names in different directories so they will have to remember to use unique snapshot names in specs so they don't conflict across these specs.

from cypress-visual-regression.

lamberski avatar lamberski commented on June 11, 2024

@TomaszG Precisely that. I have this situation right now. In our project, the folder structure is:

/components
    /atoms
    /molecules
    /organisms
    …

Now, if I have both atom and molecule components with the same name (eg. Link), previously, it would replicate the structure of folders, but now, it will mush them together into one.

  1. Before:
    • /cypress/component/snapshots/base/components/atoms/Link/Link.test.tsx/External-1024x768.png
    • /cypress/component/snapshots/base/components/molecules/Link/Link.test.tsx/External-1024x768.png
  2. After:
    • /cypress/component/snapshots/base/Link.test.tsx/External-1024x768.png
    • /cypress/component/snapshots/base/Link.test.tsx/External-1024x768.png

The path produced in both components is the same.

Currently, we don't face issues because components have unique names. However, this could be problematic in certain situations.

from cypress-visual-regression.

area73 avatar area73 commented on June 11, 2024

Hey @TomaszG , @lamberski I will take a look at this issue soon, Thanks for reporting
cc: @Zaista

from cypress-visual-regression.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.