test: add unit tests for Sidebar and useSidebar logic (#1652)
Contributor checklist
- [x] This pull request is on a separate branch and not the main branch
- [x] I have run the tests for the backend and frontend depending on what's needed for my changes as described in the testing section of the contributing guide
Description
Added unit tests for the SidebarLeft.vue component, useSidebar store logic, and related utility functions in sidebarUtils.ts.
- Verified collapsed/expanded state handling
- Tested
useSidebaractions (toggleCollapsed,toggleCollapsedSwitch) - Checked dynamic Tailwind class application for sidebar width and layout
- Added unit coverage for
sidebarUtils.tscomputed class helpers - Ensured basic ARIA attribute presence (logic-only)
- Verified responsive and scrollable behavior changes
Related issue
- #ISSUE_NUMBER #1652
Deploy Preview for activist-org ready!
| Name | Link |
|---|---|
| Latest commit | 0aa142a6f35eaafaa04e8e46d42b26b6bf9dce6f |
| Latest deploy log | https://app.netlify.com/projects/activist-org/deploys/6921caf5a93e430008c42dc3 |
| Deploy Preview | https://deploy-preview-1657--activist-org.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Thank you for the pull request! ❤️
The activist team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and Development rooms once you're in. Also consider attending our bi-weekly Saturday developer syncs! It'd be great to meet you 😊
[!NOTE] activist uses Conventional Comments in reviews to make sure that communication is as clear as possible.
Maintainer Checklist
The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
-
[x] The TypeScript, pytest and formatting workflows within the PR checks do not indicate new errors in the files changed
-
[x] The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)
-
[x] The changelog has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)
Hi @nicki182 @andrewtavis , please check this one also and let me know if any changes required. Also for this PR can you please add the hacktoberfest-accepted label. It would be really helpful.
@ayushdoesdev the tests are breaking, can you fix them? thank you for your contribution and sorry for the delay
ok @nicki182 I will check
note: Hey @ayushdoesdev 👋 Another thing to not is that it looks like your email isn't set up properly for GitHub. You can see that the commits for this PR are not coming from your account. Could you please check that the email you use for GitHub matches what you have for git config user.email in your local activist repo (can be set with git config --global user.email "GITHUB_EMAIL".
Would you wan to fix this before you send along further commits to this PR so that you get credit for your contributions?
@andrewtavis got it, I recently changed my email. I will do it. Thanks!
Hi @andrewtavis , thankyou was on a lonngg weekend, happy to see if my contributions work, please let me know if I can help more. My main expertise is in server side.