Coder Social home page Coder Social logo

Comments (6)

tulup-conner avatar tulup-conner commented on July 25, 2024 1

Yeah that makes perfect sense, you mean to use these purely to test the Storybook/docs pages themselves. I'm silly

from flowbite-react.

rluders avatar rluders commented on July 25, 2024 1

'Cause, by doing it, we are also testing our components and it's the desired behavior. Right? :)

from flowbite-react.

tulup-conner avatar tulup-conner commented on July 25, 2024

I think Cypress would be fantastic. The Jest DX is inferior, but tests will take longer. Would the plan be to migrate all tests to Cypress? I'm trying to imagine how you would distinguish unit tests from end-to-end in a library like this.

I have day to day experience with Cypress and trying to write unit tests in Jest is making me wish we could just move to Cypress now.

from flowbite-react.

rluders avatar rluders commented on July 25, 2024

No, we will not migrate any unit test to Cypress. Both have different proposals.

The plan is to use Cypress + Axe to test the components by interacting with Storybook and the Documentation. By doing it we can also check a11y aspects.

PS: Yeah, I know that we could use Cypress to unit test, but... just no.

from flowbite-react.

tulup-conner avatar tulup-conner commented on July 25, 2024

Ok, what would an example Cypress test actually look like then? I'm a bit confused by that explanation. Would you repeat the behavioral tests of the unit tests, just on the Storybook pages?

Edit: I just want to be able to start writing these so some examples would be nice so I don't go in an undesirable direction with them

from flowbite-react.

rluders avatar rluders commented on July 25, 2024

Let me give you one scenario:

Test carousel documentation page

  • Open the documentation page
  • Navigate to the carousel page
  • Check if all examples are correctly being rendered
  • Check if you can interact with the examples

The idea is to mostly test the components' examples by interacting with them through documentation and storybook, to also assure that our examples are working as expected.

Does it make sense?

This is a very, very, very basic scenario since I'm not QE :)

from flowbite-react.

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.