Commit e85dcd5
authored
test(ActivityLandscape): add component tests (JhaSourav07#1960)
## Description
Fixes JhaSourav07#677
Added comprehensive tests for the `ActivityLandscape` component.
### Changes
* Created `components/dashboard/ActivityLandscape.test.tsx`
* Mocked `framer-motion` for stable test execution
* Added test for rendering the **Activity Landscape** heading
* Added test for rendering all time-range tabs (`1W`, `1M`, `3M`, `1Y`)
* Added test to verify **3M** is active by default
* Added test to verify tab switching functionality
* Added test to verify activity bars are rendered correctly
* Added test to ensure the component handles empty datasets without
crashing
## Pillar
* [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
N/A (Test-only change)
## Checklist before requesting a review:
* [x] I have read the `CONTRIBUTING.md` file.
* [x] I have run `npm run lint` and resolved all errors.
* [x] My commit follows the Conventional Commits format.
* [x] I have made sure that I have only one commit to merge in this PR.
* [x] This PR only adds automated tests and does not modify component
behavior.1 file changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments