Equal icon indicating copy to clipboard operation
Equal copied to clipboard

[ Feature Request ] Test components

Open AbrahemAlhofe opened this issue 4 years ago • 5 comments

Is your feature request related to a problem? Please describe.

When I was working on implementing `scrollToSelectedOption`, I was confused on what are the requirements,  in another meaning what this method should do, and how I can be sure that I hadn't broken anything else

Describe the solution you'd like

We should test our components

Describe alternatives you've considered

There are two approaches to test components

1. Using `cypress`
   We are here will use development page ( `localhost:3000` )
2. Using `jest`
   We are here will mount components headless to test it, nevertheless I don't prefer that approach

Additional context

I will work on test the components after the convention about the possible approaches and details, and how to migrate from non-tested components to test-based components

AbrahemAlhofe avatar Jul 05 '21 03:07 AbrahemAlhofe

I prefer cypress too. Testing is an important thing for v1.0 to be stable and production-ready

quatrochan avatar Jul 05 '21 06:07 quatrochan

I will work on it if you will do it too, how we can organize that

AbrahemAlhofe avatar Jul 05 '21 06:07 AbrahemAlhofe

You can suggest cypress setup in the project with a basic test example for any component (it-button would be a good fit). After cypress setup is done we can proceed with tests. Also you can write you telegram or discord for direct communication

quatrochan avatar Jul 05 '21 07:07 quatrochan

I have made my email visible you can send me an email to communicate

AbrahemAlhofe avatar Jul 05 '21 07:07 AbrahemAlhofe

Cypress was announced with a new version (Cypress 10), it is in beta but I tried it, it's great, we can use it to test components but when I started testing components (specifically it-button) I had no idea what the main things should we test it.

image image

AbrahemAlhofe avatar Jun 12 '22 08:06 AbrahemAlhofe

Cypress was announced with a new version (Cypress 10), it is in beta but I tried it, it's great, we can use it to test components but when I started testing components (specifically it-button) I had no idea what the main things should we test it.

image image

I hope one day we will setup tests for the component. It'll probably be Vitest and Cyrpess. I'll move this into discussion

quatrochan avatar Jan 16 '23 09:01 quatrochan