activist icon indicating copy to clipboard operation
activist copied to clipboard

test: add unit tests for Sidebar and useSidebar logic (#1652)

Open ayushdoesdev opened this issue 1 month ago • 8 comments

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 useSidebar actions (toggleCollapsed, toggleCollapsedSwitch)
  • Checked dynamic Tailwind class application for sidebar width and layout
  • Added unit coverage for sidebarUtils.ts computed class helpers
  • Ensured basic ARIA attribute presence (logic-only)
  • Verified responsive and scrollable behavior changes

Related issue

  • #ISSUE_NUMBER #1652

ayushdoesdev avatar Oct 31 '25 07:10 ayushdoesdev

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Oct 31 '25 07:10 netlify[bot]

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.

github-actions[bot] avatar Oct 31 '25 07:10 github-actions[bot]

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)

github-actions[bot] avatar Oct 31 '25 07:10 github-actions[bot]

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 avatar Oct 31 '25 07:10 ayushdoesdev

@ayushdoesdev the tests are breaking, can you fix them? thank you for your contribution and sorry for the delay

nicki182 avatar Nov 09 '25 10:11 nicki182

ok @nicki182 I will check

ayushdoesdev avatar Nov 09 '25 12:11 ayushdoesdev

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 avatar Nov 09 '25 12:11 andrewtavis

@andrewtavis got it, I recently changed my email. I will do it. Thanks!

ayushdoesdev avatar Nov 09 '25 14:11 ayushdoesdev

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.

ayushdoesdev avatar Nov 24 '25 10:11 ayushdoesdev