Conversation
add jest-mock-extended to dependencies in package.json and package-lock.json add comprehensive test plan for Spliit application update CLAUDE.md to include testing details for jest-mock-extended and Playwright add unit tests for balances, currency, schemas, and totals modules update test script to specify source directory for jest add unit tests for getBalances and getSuggestedReimbursements functions; implement getTotalActiveUserShare tests add tests for getBalances, currency, schemas, and utility functions; ensure proper handling of edge cases add tests for balances, schemas, and totals; improve validation and edge case handling add tests for getSuggestedReimbursements; cover complex scenarios and edge cases
add end-to-end tests for balances and expense management; verify suggested reimbursements and correct amounts refactor group management tests; extract group creation logic into a helper function and improve visibility timeouts create group - validation errors, add participant Edit group - remove participant, Share group - copy URL Create expense - by percentage split mode, Create expense - by shares split mode fix: update URL expectations after removing a participant and enhance clipboard permission handling in share group test test: update view group information page test to verify visibility of group details and tabs feat: add expense creation test for amount split mode and update percentage split mode verification fix: update effort status in test plan and improve visibility checks in E2E tests feat: add E2E tests for viewing statistics page and active user balance changes feat: implement navigation between groups in E2E tests feat: add E2E tests for creating expenses with category, custom date, and reimbursement feat: add E2E test for creating expense with notes feat: add E2E tests for active user balance highlighting and zero balances display feat: add E2E tests for health check endpoints feat: add E2E tests for group creation, theme toggle persistence, and expense category selection feat: add E2E test for clearing active user selection in balances view feat: add E2E test for viewing activity page and group creation feat: add E2E test for recurring expense indicator functionality fix: update test plan to mark zero balances display test as done feat: update test plan and add E2E test for creating expense with currency conversion feat: add validation error handling for expense creation and update tests Refactor E2E tests to use helper functions for group and expense creation - Extracted group creation logic into a reusable `createGroup` function in `helpers/group.ts`. - Introduced `fillParticipants` helper to manage participant input filling. - Created `navigateToTab` function for easier navigation between group tabs. - Updated multiple E2E test files to utilize the new helper functions, improving code readability and maintainability. - Added new helper functions for expense creation and form interactions in `helpers/expense.ts` and `helpers/form.ts`. feat: add E2E tests for verifying group total and user expenses feat: daily and weekly recurring expense tests as done Updates stats when active user changes Export JSON/CSV Tests List text filter feat: update test plan and implement verification for recurring expense instances
…, and monthly recurrences
test: add persistence check for active user selection after page reload
refactor: remove outdated calculateNextDate function and import from recurring-expenses
test: implement delete current only functionality for recurring expenses
test: update activity log to verify expense creation visibility
Implement: Create daily recurring expense test
Implement: Create weekly recurring expense test
remove api test
test: update test plan to use test DB for recurring expenses and logging
Implement: Monthly recurring expense integration tests
- Add api.test.ts with 5 tests for createRecurringExpenses MONTHLY recurrence
- Tests verify: correct date creation, month boundaries (Jan->Feb, Oct->Nov),
multiple instance creation, and metadata preservation
- Update test script to use Node.js environment for Prisma compatibility
- Update jest.config.ts with ESM and transformIgnorePatterns support
refactor: remove unit and integration test scripts from package.json
Implement: Activity log tests for update and delete
Added two E2E tests to verify activity logging functionality:
- Log shows update: Tests that expense updates are recorded in activity log
- Log shows delete: Tests that expense deletions are recorded in activity log
Both tests follow existing patterns and use Playwright for UI interaction.
Tests verify that changes are properly tracked and visible in the Activity tab.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement: Activity log pagination test
Added test that verifies infinite scroll pagination works on the Activity page.
- Creates 25 expenses to exceed PAGE_SIZE of 20
- Scrolls down to trigger pagination
- Verifies both recent and older activities are visible
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement: Activity log integration tests
- Add comprehensive integration tests for activity logging
- Test CREATE_EXPENSE, UPDATE_EXPENSE, DELETE_EXPENSE, and UPDATE_GROUP activities
- Verify participantId, expenseId, and data fields are stored correctly in database
- Test activity retrieval and timestamp functionality
- All tests use real Prisma with test database
Tests cover:
- Activity creation with correct metadata
- Participant ID storage and retrieval
- Expense data (title) storage
- Activity type verification
- Timestamp validation
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement: Payload generation tests for recurring expenses
Add unit tests for createPayloadForNewRecurringExpenseLink function:
- Daily recurrence: Tests basic daily interval and year boundary handling
- Weekly recurrence: Tests 7-day interval and month boundary handling
- Monthly recurrence: Tests month-same-day logic with leap year and month boundary edge cases
All 8 tests verify correct next expense date calculation for each recurrence rule.
Tests use mock nanoid to ensure deterministic behavior.
Export createPayloadForNewRecurringExpenseLink from api.ts to enable testing of payload generation logic.
Verify: Health Readiness E2E test already passing
Test /api/health/readiness endpoint returns 200 status, confirming database connectivity.
Both health tests in tests/e2e/health.spec.ts pass successfully.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement: Mobile and Desktop responsive UI E2E tests
Add tests to verify:
- Mobile viewport (375x667) uses drawer menu instead of sidebar
- Desktop viewport (1280x1024) displays sidebar and content correctly
Both tests pass successfully.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement: Expense list pagination test with batch expense creation
- Added batch-api.ts helper with createGroupViaAPI and createExpensesViaAPI functions
- Implemented createExpensesViaAPI to efficiently create multiple expenses using existing createExpense helper
- Added pagination test that creates 21 expenses and verifies pagination works (Load More or infinite scroll)
- Test completes in ~25 seconds, well under the 30-second timeout
- Updated TEST_PLAN_STRUCTURED.md to mark pagination test as complete
- Helper reduces test execution time for tests requiring batch data creation (5+ items)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement: Mobile and desktop responsive UI tests
Verified that mobile and desktop responsive UI tests are implemented and passing:
- Mobile responsive test: Sets viewport to 375x667 and verifies drawer/hamburger menu
- Desktop responsive test: Sets viewport to 1280x1024 and verifies sidebar layout
Both tests pass successfully in 5.8 seconds total.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement: i18n Date format test
Verifies that date display format changes when switching between locales.
- Test creates expense and navigates to expense list
- Captures initial date in en-US format (e.g., "Jan 17, 2026")
- Switches locale to Spanish via UI
- Verifies date format changes to Spanish (e.g., "17 ene 2026")
- Uses regex patterns to match both English and Spanish date formats
Test passes in 10.1 seconds with proper date format verification.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement: Complete i18n Currency format test and refine i18n Date format test
Implement: Recent groups persistence test
Added E2E test to verify that visited groups persist in LocalStorage
after page reload. The test creates a group, navigates to the groups
list, and confirms the group appears in the Recent section after reload.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement: Update test plan and add transaction rollback test for recurring expenses
sync plans
fix webkit e2e issues
Implement: Add tests for BY_AMOUNT and BY_PERCENTAGE splitting methods in getBalances
remove usless playwright skill
Implement: Add data-testid attributes for testing in BalancesList and ReimbursementList components
Add end-to-end tests for expense filtering, pagination, and validation
- Implement expense filtering tests covering text search, case insensitivity, partial matches, and no results found scenarios.
- Create pagination tests to verify loading of expenses, scrolling behavior, and expense count accuracy.
- Add validation tests for the expense creation form, ensuring proper error handling for empty fields, invalid amounts, and successful submissions.
- Enhance helper functions for batch API interactions and expense management, including creating and deleting expenses.
- Improve navigation helpers to ensure visibility before interactions and streamline group creation process.
workers 2
Refactor Playwright configuration: remove dotenv setup and enhance reporter logic for code agents
lazy openai
Refactor E2E tests for improved readability and maintainability
- Updated theme toggle test to verify theme persistence after reload.
- Renamed tests for clarity and consistency.
- Simplified expense creation tests by using more specific selectors and improved visibility checks.
- Added support for expense recurrence in the expense helper functions.
- Enhanced group creation helper to suppress active user modal when needed.
- Introduced locale switching functionality in navigation helpers.
- Removed deprecated example test file.
- Improved participant management in group settings with new helper functions.
Update empty state messages for expense pagination test
fix start-local-db
fix prettier
Update CI workflow and improve local setup instructions
fix: correct command for generating Prisma client in CI workflow
chore: restructure CI workflow to separate unit tests and add Prisma migration step
refactor: reorganize CI steps for improved clarity and structure
fix: update Playwright CI workflow with correct database credentials and environment variables
refactor: comment out unused browser configurations in Playwright setup
fix: update test-e2e script to remove project specification for Playwright
playwright sharding
fix: specify browser matrix for Playwright browser installation
fix: update Playwright test command to use npx for consistency
cleanup and optimize e2e tests
fix: eliminate flaky E2E tests in balances.spec.ts by adding waitForLoadState
Add explicit 'networkidle' wait handlers after all page navigation calls to ensure
page content fully loads before assertions:
- Added await page.waitForLoadState('networkidle') after each navigateToTab() call
(7 tests) to wait for React components to render after URL navigation
- Added await page.waitForLoadState('networkidle') after page.reload() call
(1 test) to ensure page fully reloads before navigation
- Added await page.waitForLoadState('networkidle') after page.goto() calls
(2 tests) to guarantee content is loaded before assertions
This eliminates race conditions where tests would assert before dynamic content
rendered, causing flakiness on different network speeds and environments.
Fixes tests:
- suggested reimbursements displayed
- view balances page - calculates correctly
- Active user balance highlighted
- Zero balances display correctly
- Balances match expected from expenses
- Suggested reimbursements minimized
- Create reimbursement expense
- Reimbursement in expenses
stabilize e2e tests
remove temporary
update claude.md
|
If this doesn't go through then maybe fork it? @antonio-ivanovski |
Would like to keep it on this repo and keep it alive and relevant. Would love the original developer also to merge my previous PR that adds comprehensive testing suite that makes sure the implementation is sound and it is kept that way after other prs. |
|
How do you expect anyone to review this? You just dropped 17k lines in here that you don't understand yourself. |
Thanks for sharing your concern, I had the same concern before making any such changes. That is why i have made separate PR that adds comprehensive test suite: #493 Large chunk of the files changes would get resolved by rebasing when that PR is merged. Those tests will make sure that any following changes don't break implementation. Once we have that merged, we can discuss whether is worth to split this PR in two/three PRs. But yet again, large chunk of the line changes in this PR are e2e tests change and adding new tests. Next chunk is refactor of the group sync logic. Sorry to disappoint you, but i understand every single line of these 17k line changes and i have went through the whole file changes set to review them manually and make sure there is no remarks from my side before opening PR. |
|
Ok clanker |
This PR adds simple cloud group sync feature to the application. While simple, still required quite a bit of code change to get it right, especially requiring group app state refactor from scattered round pages to a centralized place (react context) where it can be read/mutated centrally.
This feature lets you:
Privacy-focused: Removed groups are hashed (SHA-256) so we never store plaintext IDs of groups you've chosen to exclude.
Sign in at /settings to get started. In development mode, magic links are written to .mail/ folder instead of being emailed.
Note: We need to first merge #493 in order the code changes of this PR to make change, it is based on that. It allowed for heavier changes without risking regression of functionality.
Todo:
Onboarding with no groups:

Onboarding with groups

Settings login email

The email being received

The settings when logged in

Group not synced

Group synced

Group synced in settings

Resolves:
#76
#257