# ROI-Rechner Schichtplanung 2026 - Next Steps & Testing Guide

**Last Updated:** 2026-01-21

## Pre-Deployment Checklist

### Code Verification

- [x] Ordio pricing verified (Starter €89, Plus €129, Pro €149 yearly rates)
- [x] Payroll Plus pricing verified (€15/payslip/month)
- [x] All calculation formulas verified (loaded wages, Ordio costs, all savings components, ROI, payback)
- [x] All year references verified (no "2025" references found)
- [x] No console statements found
- [x] Calculation logic reviewed
- [x] Comprehensive test script created (48 tests, 100% pass rate)
- [x] Documentation updated

### Automated Testing

- [x] Run test script: `node v2/scripts/dev-helpers/test-roi-rechner-calculations.js`
- [x] All 48 tests passing (100% pass rate)
- [x] Formula verification tests passing
- [x] Savings component tests passing
- [x] Edge case tests passing
- [x] Integration tests passing

## Manual Testing Checklist

### 1. Basic Calculation Functionality

**Test Scenarios:**

- [ ] **Basic Single Location Calculation**
  - Locations: 1
  - Employees: 25
  - Avg Hourly Wage: €13.00
  - Manager Hourly Wage: €25.00
  - Schedule Hours: 15 h/week
  - Overtime Hours: 80 h/month
  - Unplanned Absence: 24 h/month
  - Plan: Starter
  - Payroll Plus: Enabled
  - Expected: Positive ROI, reasonable payback period
  - Verify: Calculations match expected results

- [ ] **Multiple Locations (3)**
  - Locations: 3
  - Employees: 50
  - Plan: Plus
  - Expected: Higher costs, higher savings (scales with locations)
  - Verify: Location scaling applied correctly

- [ ] **Pro Plan**
  - Plan: Pro
  - Expected: Highest subscription cost
  - Verify: Pro pricing (€149) applied correctly

- [ ] **Payroll Plus Disabled**
  - Payroll Plus: Disabled
  - Expected: No Payroll Plus cost, lower payroll error reduction (max 35%)
  - Verify: Payroll Plus cost = 0, error reduction capped at 35%

- [ ] **VAT Enabled**
  - Include VAT: Enabled
  - Expected: Total cost increased by 19%
  - Verify: VAT calculation correct (cost × 1.19)

### 2. Savings Components Testing

**Test Scenarios:**

- [ ] **Admin Savings**
  - Schedule Hours: 20 h/week
  - Schedule Time Reduction: 40%
  - Manager Hourly Wage: €30.00
  - Locations: 1
  - Expected: Admin savings = 20 × 0.40 × 52 × (30 × 1.22) × 1
  - Verify: Admin savings calculation correct

- [ ] **Overtime Savings**
  - Overtime Hours: 50 h/month
  - Overtime Reduction: 35%
  - Avg Hourly Wage: €15.00
  - Premium Rate: 25%
  - Expected: Positive overtime savings
  - Verify: Overtime savings calculation correct

- [ ] **No Overtime (Should be 0)**
  - Overtime Hours: 0
  - Expected: Overtime savings = 0
  - Verify: Zero overtime handling correct

- [ ] **No-show Savings**
  - Unplanned Absence: 20 h/month
  - No-show Reduction: 50%
  - Last Minute Multiplier: 2.0
  - Expected: No-show savings = 20 × 0.50 × 12 × avg_wage × 1.22 × 2.0 × locations
  - Verify: No-show savings calculation correct

- [ ] **Payroll Error Savings**
  - Employees: 40
  - Payroll Error Rate: 1.5%
  - Cost per Error: €400
  - Payroll Error Reduction: 30% (without Payroll Plus)
  - Expected: Payroll error savings = 40 × 12 × 0.015 × 400 × 0.30
  - Verify: Payroll error savings calculation correct

- [ ] **Payroll Processing Savings**
  - Employees: 25
  - Minutes Saved: 15 min/payslip
  - Manager Hourly Wage: €28.00
  - Expected: Hours saved = 25 × 12 × 15 / 60, Savings = hours × manager_loaded_wage
  - Verify: Payroll processing savings calculation correct

- [ ] **Attrition Savings (Enabled)**
  - Include Attrition Savings: Enabled
  - Employees: 50
  - Old Turnover Rate: 30%
  - New Turnover Rate: 20%
  - Replacement Cost: €3,000
  - Expected: Attrition savings = 50 × 0.10 × 3,000
  - Verify: Attrition savings calculation correct

- [ ] **Attrition Savings (Disabled)**
  - Include Attrition Savings: Disabled
  - Expected: Attrition savings = 0
  - Verify: Attrition savings not calculated when disabled

### 3. Plan Selection Testing

**Test Scenarios:**

- [ ] **Starter Plan**
  - Plan: Starter
  - Expected: Subscription cost = €89 × locations × 12
  - Verify: Starter pricing applied correctly

- [ ] **Plus Plan**
  - Plan: Plus
  - Expected: Subscription cost = €129 × locations × 12
  - Verify: Plus pricing applied correctly

- [ ] **Pro Plan**
  - Plan: Pro
  - Expected: Subscription cost = €149 × locations × 12
  - Verify: Pro pricing applied correctly

### 4. Payroll Plus Testing

**Test Scenarios:**

- [ ] **Payroll Plus Enabled**
  - Payroll Plus: Enabled
  - Employees: 30
  - Expected: Payroll Plus cost = 30 × 12 × 15 = €5,400/year
  - Verify: Payroll Plus cost calculation correct

- [ ] **Payroll Plus Disabled**
  - Payroll Plus: Disabled
  - Expected: Payroll Plus cost = 0
  - Verify: No Payroll Plus cost when disabled

- [ ] **Payroll Plus Error Reduction Minimum**
  - Payroll Plus: Enabled
  - Payroll Error Reduction: 30% (below minimum)
  - Expected: Payroll error reduction adjusted to minimum 55%
  - Verify: Error reduction minimum enforced with Payroll Plus

- [ ] **Payroll Plus Error Reduction Maximum**
  - Payroll Plus: Disabled
  - Payroll Error Reduction: 50% (above maximum)
  - Expected: Payroll error reduction adjusted to maximum 35%
  - Verify: Error reduction maximum enforced without Payroll Plus

### 5. VAT Testing

**Test Scenarios:**

- [ ] **VAT Enabled**
  - Include VAT: Enabled
  - Expected: Total cost = (subscription + Payroll Plus) × 1.19
  - Verify: VAT calculation correct

- [ ] **VAT Disabled**
  - Include VAT: Disabled
  - Expected: Total cost = subscription + Payroll Plus (no VAT)
  - Verify: No VAT applied when disabled

### 6. Edge Cases Testing

**Test Scenarios:**

- [ ] **Minimum Values**
  - Locations: 1
  - Employees: 1
  - All inputs at minimum
  - Expected: Calculations still work, ROI may be negative
  - Verify: Minimum values handled correctly

- [ ] **Maximum Values (Capped)**
  - Locations: 200 (should cap at 100)
  - Employees: 20000 (should cap at 10000)
  - Schedule Hours: 100 (should cap at 80)
  - Overtime Hours: 2000 (should cap at 1000)
  - Expected: Values capped appropriately
  - Verify: Maximum value capping works correctly

- [ ] **Very High ROI (Should Cap at 1000%)**
  - High savings scenario
  - Expected: ROI capped at 1000%
  - Verify: ROI capping works correctly

- [ ] **Very Long Payback (Should Cap at 60 Months)**
  - Low savings scenario
  - Expected: Payback capped at 60 months
  - Verify: Payback capping works correctly

- [ ] **Zero Savings (Negative ROI)**
  - All savings inputs at zero
  - Expected: Total savings = 0, negative ROI
  - Verify: Zero savings handling correct

### 7. ROI and Payback Calculations

**Test Scenarios:**

- [ ] **ROI Calculation**
  - Net Benefit: €10,000
  - Total Ordio Cost: €5,000
  - Expected: ROI = (10,000 / 5,000) × 100 = 200%
  - Verify: ROI calculation correct

- [ ] **Payback Calculation**
  - Total Ordio Cost: €6,000/year
  - Total Savings: €12,000/year
  - Expected: Payback = 6,000 / (12,000 / 12) = 6 months
  - Verify: Payback calculation correct

### 8. Form Validation Testing

**Test Scenarios:**

- [ ] **Input Validation**
  - Test all input fields with invalid values
  - Expected: Values capped/validated appropriately
  - Verify: Input validation works correctly

- [ ] **Required Fields**
  - Test form submission with missing fields
  - Expected: Form validation prevents submission
  - Verify: Required field validation works

### 9. UI/UX Testing

**Test Scenarios:**

- [ ] **Form Layout**
  - Verify all form sections display correctly
  - Verify tooltips work correctly
  - Verify plan comparison section works

- [ ] **Results Display**
  - Calculate ROI
  - Verify results section displays correctly
  - Verify all savings components shown
  - Verify ROI and payback displayed prominently

- [ ] **Mobile Responsiveness**
  - Test on mobile device
  - Verify form is usable on mobile
  - Verify results display correctly on mobile

### 10. Schema Validation

**Test Scenarios:**

- [ ] **Schema.org Markup**
  - Use Google Rich Results Test: https://search.google.com/test/rich-results
  - Enter URL: `https://www.ordio.com/tools/roi-rechner-schichtplanung`
  - Expected: No errors, all schemas valid
  - Verify: WebPage, WebApplication, FAQPage schemas valid

- [ ] **FAQ Schema**
  - Verify all 8 FAQs included in FAQPage schema
  - Expected: All FAQs present and valid
  - Verify: FAQ schema complete

## Performance Testing

### Load Time

- [ ] **Page Load Time**
  - Test page load time
  - Expected: < 3 seconds
  - Verify: Page loads quickly

- [ ] **Calculation Speed**
  - Test calculation speed with various inputs
  - Expected: Instant calculation
  - Verify: Calculations are fast

## Browser Compatibility Testing

### Desktop Browsers

- [ ] **Chrome (Latest)**
  - Test all functionality
  - Expected: Fully functional
  - Verify: All features work

- [ ] **Firefox (Latest)**
  - Test all functionality
  - Expected: Fully functional
  - Verify: All features work

- [ ] **Safari (Latest)**
  - Test all functionality
  - Expected: Fully functional
  - Verify: All features work

- [ ] **Edge (Latest)**
  - Test all functionality
  - Expected: Fully functional
  - Verify: All features work

### Mobile Browsers

- [ ] **iOS Safari**
  - Test on iPhone
  - Expected: Fully functional
  - Verify: All features work

- [ ] **Android Chrome**
  - Test on Android device
  - Expected: Fully functional
  - Verify: All features work

## Deployment Checklist

### Pre-Deployment

- [x] All automated tests passing
- [x] Code review completed
- [x] Documentation updated
- [ ] Manual testing completed
- [ ] Schema validation completed
- [ ] Browser compatibility verified

### Deployment Steps

1. **Verify Test Results**
   ```bash
   node v2/scripts/dev-helpers/test-roi-rechner-calculations.js
   ```
   - Expected: All 48 tests passing
   - Verify: 100% pass rate

2. **Schema Validation**
   - Use Google Rich Results Test
   - Verify all schemas valid
   - Fix any errors if found

3. **Deploy to Production**
   - Deploy updated files
   - Verify deployment successful

4. **Post-Deployment Verification**
   - Test calculator on production URL
   - Verify all calculations work correctly
   - Verify schema markup valid
   - Verify no console errors

### Post-Deployment Monitoring

- [ ] **Monitor for Errors**
  - Check error logs
  - Monitor user feedback
  - Verify no calculation errors reported

- [ ] **Performance Monitoring**
  - Monitor page load times
  - Monitor calculation performance
  - Verify no performance degradation

## Known Issues

None identified during review.

## Notes

- Calculator uses yearly pricing rates (Starter €89, Plus €129, Pro €149)
- Payroll Plus pricing: €15 per payslip/month (verified 2026)
- Employer on-cost rate: Default 22% (actual 2026 rates ~21.15%, rounded approximation)
- VAT rate: 19% (correct for Germany)
- All formulas verified and tested
- Comprehensive test coverage (48 test cases, 100% pass rate)

## Support

For issues or questions, refer to:
- Update Summary: `ROI_RECHNER_SCHICHTPLANUNG_2026_UPDATE_SUMMARY.md`
- Documentation: `roi-rechner-schichtplanung-documentation.md`
- Test Script: `v2/scripts/dev-helpers/test-roi-rechner-calculations.js`
