OpenPecha / monlamai-app-web

MIT License
0 stars 0 forks source link

Component testing #168

Open Karma-Tsering opened 1 month ago

Karma-Tsering commented 1 month ago

Description

We are implementing component testing for the Monlam application to ensure each component functions correctly in isolation. This involves mocking the hooks and dependencies used by the components to accurately test their behavior and output under various scenarios.

completion criteria

Render each component in isolation and mock the required dependencies. Also the test should cover all the scenarios and their edge cases

Subtasks

Since there are many components, I will start with the simpler ones and progress to the more complex ones.

ta4tsering commented 1 month ago

take advice from Tamdin or Kunsang for how to make subtasks

kaldan007 commented 1 month ago

list all the components and discuss with @tenkus47 .

Karma-Tsering commented 1 month ago

As discussed with kunsang, I don't need to write test for AudioPlayerWithWave component.

Karma-Tsering commented 1 month ago

The appinstaller component required PWA behavior to test and isolating this component is not testable for now. I will look into it along with my daily tasks and try to write a test for it.

kaldan007 commented 1 month ago

Update the test with new code.

tenkus47 commented 1 month ago

suggestions:

  1. ActionButtons -> null output is tackled as empty string
  2. Card -> i don't thing line 50 where we check the card to be focussed is necessary because its already done on previous test
  3. Countdown -> is not necessary for testing, we can remove it simply
  4. Devider -> i dont think this needs a test too . may be we can discuss it