This pull request updates authentication configuration handling and improves test reliability and code clarity in the frontend. The most important changes include making authentication config parsing more robust, updating how password visibility is toggled in the settings UI, and ensuring tests properly set up dependencies and use more reliable state checks.
Authentication configuration handling:
- Updated the startup config parsing in
App.vueto accept both camelCase and PascalCase variants ofauthenticationRequiredfrom the backend, improving compatibility with different API responses. - Changed the value persisted for
authenticationRequiredinSettingsView.vueto use explicit string values'true'or'false'instead of'Enabled'/'Disabled', making the UI and backend expectations more consistent.
Password visibility toggle improvements:
- Refactored the password visibility toggle in
SettingsView.vueto use a dedicatedtoggleShowPasswordfunction, avoiding template assignment edge cases and improving maintainability. - Updated the password toggle button to use the new function and added a
data-testattribute for easier testing.
Test reliability and setup:
- Enhanced
SettingsView.spec.tstests to properly set up Pinia and Vue Router instances, and switched to direct state checks for password visibility, resulting in more robust and reliable tests. - Added missing imports to
library.spec.tsfor consistent test setup.
Automated canary build