Add e2e tests covering authentication and authorization#143
Merged
Conversation
c7a0cad to
51797ec
Compare
There was a problem hiding this comment.
Pull request overview
This PR expands the e2e test suite to cover authentication and authorization workflows by integrating the Genesis backend into the testing pipeline. It introduces a "hybrid mode" feature that allows the application to function both with and without authentication, making it more flexible for testing and deployment scenarios.
Changes:
- Added comprehensive e2e test covering user authentication, data persistence, and logout/login cycles
- Refactored Genesis SDK client to support session token management for Node.js environments (Playwright tests)
- Introduced
OCULAR_HYBRID_MODEenvironment variable to enable demo data loading alongside authentication features - Enhanced CI/CD pipeline to spin up Genesis backend and run e2e tests against a real server
Reviewed changes
Copilot reviewed 34 out of 36 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/auth.spec.ts | New e2e test validating authentication flow and data persistence across login/logout |
| src/store/genesis/genesis.sdk.ts | Refactored to support session token storage and renamed from createGenesisStore to createClient |
| src/store/storage/createStorage.ts | Updated to use new SDK client, moved type definitions from deleted files |
| src/store/storage/useStorage.ts | Changed export to only export Storage type instead of all exports |
| src/storage/types.ts | Deleted - types moved to createStorage.ts |
| vite.config.ts | Extracted proxy configuration to be shared between server and preview modes |
| playwright.config.ts | Reduced timeout and enabled server reuse for all environments |
| .github/workflows/main.yml | Split test and build jobs, added Genesis backend setup, created reusable setup action |
| .github/workflows/actions/wait-for-health-check/action.yml | New reusable action for waiting on service health checks |
| .github/workflows/actions/setup-repository/action.yml | New reusable action for repository setup with pnpm and Node.js |
| tsconfig.json | Removed unused @storage/* path alias |
| src/types/env.d.ts | Added OCULAR_HYBRID_MODE environment variable type |
| src/app/components/base/button/Button.vue | Added support for arbitrary data attributes via data prop |
| src/app/components/base/text-field/TextField.vue | Added testId prop for e2e testing |
| src/app/components/base/cell-menu/CellMenu.vue | Added test ID support for menu actions |
| src/app/components/base/cell-menu/CellMenu.types.ts | Added optional id field to CellMenuAction |
| src/app/components/feature/budget-pane/BudgetGroups.vue | Added text color for current month indicator (accessibility fix) |
| src/app/components/feature/budget-pane/BudgetGroupBudgetCell.vue | Added IDs to cell menu actions for testing |
| src/app/components/feature/chart-placeholder/ChartPlaceholder.vue | Updated demo button visibility to respect hybrid mode |
| src/app/pages/navigation/auth/LoginDialog.vue | Added test IDs to username and password fields |
| src/app/pages/navigation/auth/CloudButton.vue | Enhanced with data-status attribute, updated to use hybrid mode constant |
| src/app/pages/navigation/tools/ToolsButton.vue | Updated demo button visibility logic for hybrid mode |
| src/app/pages/Frame.vue | Updated import path for useStorage |
| src/app/App.vue | Added hybrid mode support for demo data loading |
| src/store/state/utils/budgets.ts | Renamed finalBalance to sumOfBudgetYear for clarity |
| src/store/state/utils/budgets.spec.ts | Updated test to use renamed function |
| src/store/state/index.ts | Added totalBalance computed property, updated to use renamed function |
| src/store/state/template/useTemplateData.ts | Simplified loading condition, updated import paths |
| src/store/settings/index.ts | Updated import path for useStorage |
| Multiple Vue components | Updated import paths from @storage/index to @store/storage/useStorage.ts |
| .env.example | Added documentation for OCULAR_HYBRID_MODE |
| .env.genesis | Removed test user creation (only admin remains) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fix issue with month badge in light theme
51797ec to
1518931
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR expands the e2e tests to not only cover demo functionality but also the backend,
I made sure that:
chore: fix eslintcommits).