Giter VIP home page Giter VIP logo

Comments (13)

michalsanger avatar michalsanger commented on May 20, 2024 1

It's not fine to have files in PR no one reads and updates blindly when it's broken. It just bring illusion of being tested

from orbit.

michalsanger avatar michalsanger commented on May 20, 2024

Please only if it does not produce one huge snapshot file. No one reads that during code review

from orbit.

fallion avatar fallion commented on May 20, 2024

@michalsanger Huge snapshot file is fine if it shows only relevant changes. The issue with the implementation on Balkan was that classnames were generated for the entire project instead of each component. So when you updated classnames you would update all of the classnames, rendering it unreadable.

from orbit.

fallion avatar fallion commented on May 20, 2024

So you’re saying that snapshot tests have no purpose?

from orbit.

fallion avatar fallion commented on May 20, 2024

Our aim should be to have functioning documentation via Storybook. How do you want to guarantee that all components still render?

from orbit.

michalsanger avatar michalsanger commented on May 20, 2024

I'm saying having huge snapshot file is a problem, because if developer accidentally updates it no one will review those changes, because the file will be big and messy. It's the same with PR with 10 changed files vs 100 changed files. Or how many times do you review content of yarn.lock?

Having snapshots per component looks better to me.

from orbit.

fallion avatar fallion commented on May 20, 2024

But Github shows you only the changes between master and the branch. What does it matter if it's big if it shows only the relevant changes?

I can check if Storyshots allows per story files yet.

from orbit.

michalsanger avatar michalsanger commented on May 20, 2024

Are the changes readable? Will you understand that the snapshot change is OK or it's broken? This should come with easy visual verification. Generate storybook for every PR or maybe even faster generate gallery of screenshots

https://www.npmjs.com/package/storybook-chrome-screenshot

from orbit.

fallion avatar fallion commented on May 20, 2024

Does GitHub allow you to view visual changes between images?

The changes are DOM output changes. They should be readable.

from orbit.

michalsanger avatar michalsanger commented on May 20, 2024

I don't need visual testing πŸš€ science. I need quick way to see component works. I can spent few seconds running through images when I see something was changed in storyshots. But it would suck if I would have to checkout the branch, install deps, run storybook, find the story...

from orbit.

VaclavSir avatar VaclavSir commented on May 20, 2024

Does GitHub allow you to view visual changes between images?

Yes, it shows the old and new image (see the commit):

github com_kiwicom_react-kiwi-ui_commit_ce90ffc04593c00ef5ad88c0d768f6b20b010d51

from orbit.

fallion avatar fallion commented on May 20, 2024

Thanks. We will use the visual storyshot testing.

from orbit.

fallion avatar fallion commented on May 20, 2024

Closed in favour of #75

from orbit.

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.