[Remove Vuetify from Studio] Convert Sign In page unit tests to Vue Testing Library
Summary
Converted AccountsMain (Sign In page) unit tests from Vue Test Utils to Vue Testing Library, focusing on user-observable behavior instead of implementation details.
Changes:
- Replaced
mount()withrender()and Vue Testing Library queries - Simplified Vuex mocking: Using
mocks: { $store }instead ofcreateLocalVue(component only uses dispatch/state) - Minimal stubs: Only
PolicyModalsstub kept - 8 comprehensive tests covering all major user workflows
Test Coverage:
- Form rendering and display
- Form validation (empty submission)
- Login failures with error messaging
- Successful login and redirect flow
- Protected page access with
?next=parameter - Inactive account detection
- Offline state handling
All tests use semantic queries (getByRole, getByLabelText, getByText) and test only user-visible behavior.
…
References
- Issue: #5534 (Convert AccountsMain tests to VTL)
- Related: #5536 (CatalogList conversion)
Reviewer guidance
Testing:
- Run the test suite
- pnpm run test -- accountsMain.spec.js
- All 8 tests should pass
…
Hii @MisRob, can you please have a look and provide a reviewer for this PR, implementation is complete and If any changes require please let me know.
Thank you @vtushar06, we will assign a reviewer soon.
I gave it a very quick skim, and I appreciate that you applied all the recent learnings. A reviewer will check on it in more detail, but high-level it looks nice!
Hii @LianaHarris360, Thanks for approving and merging this, can you please look into similar PR #5536.
No problem! And a reviewer has already been assigned to that pull request, they will review it when they have the opportunity :)