Skip to content

Conversation

@TaprootFreak
Copy link
Collaborator

Summary

  • Add /accounting route with Admin/Compliance access guard
  • Add bank balance sheet T-account display (Soll/Haben format)
  • Auto-select first bank on page load (no "All Banks" option)
  • Show opening balance, income (CRDT), expenses (DBIT), closing balance
  • Validate calculated closing balance against defined closing balance
  • Green/red indicator for balance validation status
  • Add URL params for year and bank preselection (e.g. ?year=2025&bank=CH34...)
  • Add Playwright E2E tests for balance sheet functionality

Dependencies

Test plan

  • Open /accounting page as Admin user
  • Verify first bank is auto-selected and balance sheet loads
  • Test year/bank selection updates balance sheet
  • Verify validation message shows green when balance matches
  • Test direct link with URL params
  • Run Playwright tests: npx playwright test accounting-balances

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

🤖 PR Review Bot

⚠️ Security: 0 critical, 34 high vulnerabilities


This is an automated review. Please address the issues above.

- Add /accounting route with Admin/Compliance guard
- Add bank balance sheet T-account display (Soll/Haben)
- Auto-select first bank on page load
- Show opening balance, income, expenses, closing balance
- Validate against defined closing balance (green/red indicator)
- Add URL params for year and bank preselection
- Add Playwright E2E tests for balance sheet functionality
@TaprootFreak TaprootFreak force-pushed the feature/accounting-page branch from fd67166 to 98b5f81 Compare January 19, 2026 19:05
Replace all hardcoded dev.api.dfx.swiss and api.dfx.swiss URLs in test
files with process.env.REACT_APP_API_URL to enable local testing
against localhost API.
- Add 29 Playwright tests covering Summary and Detailed views
- Test multiple banks (Raiffeisen, Maerki, Yapeal, Olkypay) and years (2024, 2025)
- Implement proper authentication flow using redirect URL parameter
- Add view switching tests (Summary <-> Detailed)
- Add dropdown filter tests (Year, Bank, Type)
- Add UI structure verification tests
- Add validation message tests
- Include screenshot baselines for visual regression testing
- Fix waitForDetailedView to handle React state sync timing
}

// Helper: Wait for app to be fully loaded
async function waitForAppLoaded(page: Page): Promise<void> {
const yearOptions = getYearOptions();

// Get selected bank
const selectedBank = useMemo(() => banks.find((b) => b.iban === selectedBankIban), [banks, selectedBankIban]);
- Increase viewport from 1280x720 to 1400x1200 for better visibility
- Add scroll-to-bottom before screenshot to ensure full render
- Regenerate all 35 accounting test baselines
await takeCleanScreenshot(page, 'compare-01-maerki-2025-summary.png');

// Get summary values
const summaryIncome = await page.locator('[data-testid="total-income"]').textContent();

// Get summary values
const summaryIncome = await page.locator('[data-testid="total-income"]').textContent();
const summaryExpenses = await page.locator('[data-testid="total-expenses"]').textContent();
// Get summary values
const summaryIncome = await page.locator('[data-testid="total-income"]').textContent();
const summaryExpenses = await page.locator('[data-testid="total-expenses"]').textContent();
const summaryBalance = await page.locator('[data-testid="closing-balance"]').textContent();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants