Files
Komediruzecki f98c2f782e chore: consolidate test dirs, archive old docs, add SECURITY.md
- Merge tests/e2e/ into test/e2e/ (single test directory)
- Update backend/jest.config.js for new test path
- Archive 4 duplicate GitHub issues docs to docs/archive/issues/
- Archive 6 completed plan files to docs/archive/plans/
- Add SECURITY.md
2026-06-10 23:24:10 +00:00

8.5 KiB

E2E Test Specification - Analytics Module

Module: Analytics Test Suite: Frontend Version: 2.0 Status: Active

1. Test Overview

This specification defines end-to-end tests for the Analytics module, covering charts, summaries, and data visualization.

2. Test Scenarios

2.1. View Analytics

ID: T-001 Priority: Must Type: Smoke

Steps

  1. Navigate to "Analytics" module
  2. Verify dashboard displays
  3. Verify summary cards

Validation

  • Analytics page renders
  • Summary cards visible
  • Charts present
  • Period selector visible

Expected Result

User sees analytics dashboard.

2.2. Change Date Range

ID: T-002 Priority: Must Type: Positive

Steps

  1. Click period selector
  2. Select "This Week"
  3. Verify charts update
  4. Verify summary updates

Validation

  • Period selector works
  • Charts update
  • Summary numbers update
  • Tooltip shows date range

Expected Result

Date range changes work.

2.3. View Spending by Category

ID: T-003 Priority: Must Type: Positive

Steps

  1. Navigate to Analytics
  2. View spending by category chart
  3. Verify chart renders
  4. Verify labels

Validation

  • Chart visible
  • Labels correct
  • Data matches transactions
  • Interactive tooltips

Expected Result

Spending by category chart works.

2.4. View Income vs Expense

ID: T-004 Priority: Must Type: Positive

Steps

  1. Navigate to Analytics
  2. View income vs expense chart
  3. Verify line chart
  4. Verify totals

Validation

  • Chart visible
  • Income line correct
  • Expense line correct
  • Net flow shown

Expected Result

Income vs expense chart works.

2.5. View Cash Flow Trend

ID: T-005 Priority: Must Type: Positive

Steps

  1. Navigate to Analytics
  2. View cash flow trend chart
  3. Verify chart renders
  4. Verify dates

Validation

  • Chart visible
  • Dates correct
  • Values correct
  • Interactive hover

Expected Result

Cash flow trend chart works.

2.6. View Budget Progress

ID: T-006 Priority: Must Type: Positive

Steps

  1. Navigate to Analytics
  2. View budget progress chart
  3. Verify chart renders
  4. Verify progress indicators

Validation

  • Chart visible
  • Budget amounts correct
  • Current spending shown
  • Remaining shown

Expected Result

Budget progress chart works.

2.7. Export Report

ID: T-007 Priority: Should Type: Positive

Steps

  1. Click export button
  2. Select format (CSV)
  3. Verify download

Validation

  • Export options visible
  • File downloads
  • File contains data
  • Date range included

Expected Result

Report export works.

2.8. Change Chart Type

ID: T-008 Priority: Should Type: Positive

Steps

  1. Click chart type selector
  2. Change to different type
  3. Verify chart updates

Validation

  • Type selector visible
  • Chart updates
  • New type renders
  • Old data visible

Expected Result

Chart type changes work.

2.9. Mobile Responsive

ID: T-009 Priority: Must Type: Visual

Steps

  1. Resize to mobile
  2. Navigate to Analytics
  3. Verify layout

Validation

  • Layout responsive
  • Charts scrollable
  • Summary readable
  • Controls accessible

Expected Result

Analytics work on mobile.

2.10. Empty State

ID: T-010 Priority: Must Type: Visual

Steps

  1. Navigate with no data
  2. Verify empty state

Validation

  • Empty message visible
  • Illustration present
  • "Add Data" call to action

Expected Result

Empty state displays appropriately.

2.11. Toast Notifications

ID: T-011 Priority: Must Type: Visual

Steps

  1. Export report
  2. Verify toast

Validation

  • Toast appears
  • Success message
  • Auto-dismisses

Expected Result

Toast notification displayed.

3. Negative Test Scenarios

3.1. Invalid Period

ID: T-N001 Priority: Should Type: Negative

Steps

  1. Try to select invalid period
  2. Verify error

Expected Result

Error for invalid period.

3.2. No Data for Period

ID: T-N002 Priority: Should Type: Negative

Steps

  1. Select period with no data
  2. Verify empty state

Expected Result

Empty state shows when no data.

3.3. Network Error

ID: T-N003 Priority: Should Type: Negative

Steps

  1. Simulate network failure
  2. Try to load analytics
  3. Verify error

Expected Result

Error displayed.

3.4. Invalid Export Format

ID: T-N004 Priority: Should Type: Negative

Steps

  1. Try invalid export format
  2. Verify error

Expected Result

Invalid format rejected.

4. Integration Tests

4.1. Analytics and Transactions

ID: T-I001 Priority: Must Type: Integration

Steps

  1. Create transactions
  2. Navigate to Analytics
  3. Verify charts include transactions
  4. Verify totals match

Validation

  • Charts reflect transactions
  • Totals accurate
  • Dates correct

Expected Result

Analytics reflects transactions.

4.2. Analytics and Accounts

ID: T-I002 Priority: Should Type: Integration

Steps

  1. Create accounts
  2. Create transactions
  3. View analytics
  4. Verify account totals

Validation

  • Account breakdown shown
  • Totals correct
  • Charts include account data

Expected Result

Analytics includes account data.

4.3. Analytics and Budgets

ID: T-I003 Priority: Should Type: Integration

Steps

  1. Create budgets
  2. Create transactions
  3. View analytics
  4. Verify budget progress

Validation

  • Budget progress shown
  • Current spending calculated
  • Over-budget indicators

Expected Result

Analytics shows budget progress.

4.4. Analytics and Dashboard

ID: T-I004 Priority: Should Type: Integration

Steps

  1. Update data
  2. View Dashboard
  3. Verify totals match analytics

Validation

  • Dashboard totals match
  • Data consistency maintained
  • Real-time updates

Expected Result

Analytics and Dashboard are consistent.

4.5. Charts Update Real-Time

ID: T-I005 Priority: Should Type: Integration

Steps

  1. View Analytics
  2. Create transaction
  3. Verify charts update
  4. Verify summary updates

Validation

  • Charts update immediately
  • Totals updated
  • No page refresh needed

Expected Result

Charts update in real-time.

5. Performance Tests

5.1. Load Speed

ID: T-P001 Priority: Must Type: Performance

Steps

  1. Navigate to Analytics
  2. Measure load time
  3. Verify meets 2s threshold

Expected Result

Page loads within 2 seconds.

5.2. Chart Rendering

ID: T-P002 Priority: Must Type: Performance

Steps

  1. Change date range
  2. Measure chart render time
  3. Verify meets 300ms

Expected Result

Charts render quickly.

5.3. Filter Performance

ID: T-P003 Priority: Should Type: Performance

Steps

  1. Apply filter
  2. Measure response
  3. Verify meets 500ms

Expected Result

Filter responds quickly.

6. Accessibility Tests

6.1. Keyboard Navigation

ID: T-A001 Priority: Must Type: Accessibility

Steps

  1. Navigate with Tab
  2. Test controls

Validation

  • Tab moves through items
  • Buttons accessible
  • Period selector accessible

Expected Result

Full keyboard navigation.

6.2. Chart Accessibility

ID: T-A002 Priority: Should Type: Accessibility

Steps

  1. Test charts with screen reader
  2. Verify announcements

Validation

  • Chart type announced
  • Data points announced
  • Hover details announced

Expected Result

Charts are accessible.

7. Cross-Browser Tests

7.1. Browser Compatibility

ID: T-C001 Priority: Must Type: Cross-Browser

Steps

  1. Test in Chrome, Firefox, Safari, Edge
  2. Verify behavior

Validation

  • All browsers work
  • No console errors
  • Charts render correctly

Expected Result

Works across browsers.

8. Acceptance Criteria

  • All Must scenarios pass
  • At least 80% of Should scenarios pass
  • Performance targets met
  • Accessibility requirements met
  • No critical bugs

9. Test Execution Notes

  • Test with various date ranges
  • Test with large datasets
  • Verify chart interactions
  • Test export functionality

10. Dependencies

  • Backend /api/analytics must be operational
  • Backend /api/transactions data source
  • Backend /api/budgets data source
  • Auth system must be functional