Commit 7bc9c64
authored
test(dashboard): verify exit compare mode resets state properly (JhaSourav07#1156)
## Description
Added a new test case in components/dashboard/DashboardClient.test.tsx
to verify the state reset logic for the "Exit Compare Mode"
functionality. The test simulates a successful comparison fetch, asserts
the appearance of the exit button, clicks it, and finally verifies that
the UI reverts to the default single-profile state (the original compare
button returns and the exit button is removed from the DOM).
Fixes JhaSourav07#1065
## Pillar
- [ ] 🎨 Pillar 1 — New Theme Design
- [ ] 📐 Pillar 2 — Geometric SVG Improvement
- [ ] 🕐 Pillar 3 — Timezone Logic Optimization
- [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
<img width="948" height="387" alt="Screenshot 2026-05-29 102110"
src="https://github.com/user-attachments/assets/e494f792-8302-44f5-8441-6bf0e2cebe4c"
/>
## Checklist before requesting a review:
[x] I have read the CONTRIBUTING.md file.
[x] I have tested these changes locally
(localhost:3000/api/streak?user=YOUR_USERNAME).
[x] I have run npm run format and npm run lint locally and resolved all
errors (CI will fail otherwise).
[x] My commits follow the Conventional Commits format (e.g.,
feat(themes): ..., fix(calculate): ...).
[ ] I have updated README.md if I added a new theme or URL parameter.
[x] I have starred the repo.
[x] I have made sure that I have only one commit to merge in this PR.
[x] The SVG output matches the CommitPulse "premium quality" aesthetic
standard.
[x] (Recommended) I joined the CommitPulse Discord community for
contributor discussions.1 file changed
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
236 | 284 | | |
237 | 285 | | |
238 | 286 | | |
| |||
0 commit comments