[
  {
    "case": "clean_win_session",
    "input": {
      "buyIn": 5000,
      "cashOut": 5500,
      "fees": 0,
      "withdrawnBonus": 0
    },
    "expected": {
      "effectiveCashOut": 5500,
      "netResult": 500,
      "sessionRoiPercent": 10,
      "warning": "realized record only; not EV, tax, payout, legal or bankroll advice"
    }
  },
  {
    "case": "fees_turn_small_win_negative",
    "input": {
      "buyIn": 1000,
      "cashOut": 1020,
      "fees": 35,
      "withdrawnBonus": 0
    },
    "expected": {
      "effectiveCashOut": 985,
      "netResult": -15,
      "sessionRoiPercent": -1.5,
      "warning": "fees can change realized session result"
    }
  },
  {
    "case": "withdrawn_bonus_realized",
    "input": {
      "buyIn": 100,
      "cashOut": 0,
      "fees": 0,
      "withdrawnBonus": 50
    },
    "expected": {
      "effectiveCashOut": 50,
      "netResult": -50,
      "sessionRoiPercent": -50,
      "warning": "include bonus value only if actually withdrawn or settled"
    }
  },
  {
    "case": "zero_buy_in_roi_guard",
    "input": {
      "buyIn": 0,
      "cashOut": 25,
      "fees": 0,
      "withdrawnBonus": 0
    },
    "expected": {
      "effectiveCashOut": 25,
      "netResult": 25,
      "sessionRoiPercent": 0,
      "warning": "ROI is reported as 0.00% when buy-in is zero to avoid fake precision"
    }
  },
  {
    "case": "invalid_negative_field",
    "input": {
      "buyIn": 100,
      "cashOut": -10,
      "fees": 0,
      "withdrawnBonus": 0
    },
    "expected": {
      "error": "Enter zero or a positive number in every money field."
    }
  },
  {
    "case": "share_url_excludes_private_note",
    "input": {
      "buyIn": 500,
      "cashOut": 450,
      "fees": 5,
      "withdrawnBonus": 0,
      "productType": "slots",
      "bonusInvolved": "no",
      "w2gStatus": "unknown",
      "withholdingStatus": "unknown",
      "sessionNote": "private note should not be encoded"
    },
    "expected": {
      "queryParameters": ["buyIn", "cashOut", "fees", "bonus", "product", "bonusInvolved", "w2g", "withholding"],
      "excludedParameters": ["sessionNote", "sessionDate", "operatorVenue", "stateLocationNote", "account", "identity"],
      "canonical": "/tools/profit/"
    }
  },
  {
    "case": "record_classification_labels",
    "input": [
      { "buyIn": 100, "cashOut": 125, "fees": 0, "withdrawnBonus": 0 },
      { "buyIn": 100, "cashOut": 75, "fees": 0, "withdrawnBonus": 0 },
      { "buyIn": 100, "cashOut": 100, "fees": 0, "withdrawnBonus": 0 },
      { "buyIn": 0, "cashOut": 25, "fees": 0, "withdrawnBonus": 0 }
    ],
    "expected": {
      "labels": ["Winning record", "Losing record", "Break-even record", "Zero-buy-in / non-standard record"],
      "warning": "classification is a record label, not tax advice"
    }
  },
  {
    "case": "w2g_form_record_fields_do_not_change_formula",
    "input": {
      "buyIn": 1000,
      "cashOut": 1100,
      "fees": 10,
      "withdrawnBonus": 0,
      "w2gStatus": "yes",
      "withholdingStatus": "yes",
      "formAmount": 1200
    },
    "expected": {
      "effectiveCashOut": 1090,
      "netResult": 90,
      "sessionRoiPercent": 9,
      "taxRecordReminderIncludes": ["W-2G/form marked yes", "withholding marked yes", "form/statement amount entered"]
    }
  },
  {
    "case": "clear_button_scope",
    "input": {
      "action": "clear_entered_values"
    },
    "expected": {
      "clears": ["browser form", "temporary local session table"],
      "doesNotDelete": ["downloaded TXT files", "downloaded CSV files"],
      "storage": "no cloud storage"
    }
  },
  {
    "case": "cpa_ready_summary_boundary",
    "input": {
      "buyIn": 1000,
      "cashOut": 1200,
      "fees": 20,
      "withdrawnBonus": 50,
      "stateLocationNote": "state note",
      "operatorVenue": "venue label",
      "productType": "blackjack",
      "bonusInvolved": "yes",
      "w2gStatus": "no",
      "withholdingStatus": "unknown"
    },
    "expected": {
      "summaryIncludes": [
        "This is a session record, not a tax return.",
        "Buy-in",
        "Cash-out",
        "Fees",
        "Realized withdrawn bonus",
        "Product type",
        "State/location note",
        "Operator/venue",
        "W-2G/form received",
        "Withholding shown"
      ],
      "summaryExcludesAdvice": [
        "you owe",
        "deduct",
        "file as"
      ]
    }
  },
  {
    "case": "csv_import_template_local_only",
    "input": {
      "headers": ["session_date", "state_location_note", "operator_venue", "product_type", "buy_in", "cash_out", "fees", "withdrawn_bonus", "bonus_involved", "w2g_form_received", "withholding_shown"],
      "row": ["2026-05-19", "CA trip note", "venue label", "slots", "100.00", "125.00", "5.00", "0.00", "no", "unknown", "unknown"]
    },
    "expected": {
      "effectiveCashOut": 120,
      "netResult": 20,
      "recordClassification": "Winning record",
      "storage": "browser-local import only",
      "upload": "none"
    }
  },
  {
    "case": "irs_style_record_checklist_visible",
    "input": {
      "section": "IRS-style record checklist"
    },
    "expected": {
      "records": ["Date / type / activity", "Operator / venue / location", "W-2G / Form 5754", "Tickets, statements or cashier records", "Withholding"],
      "boundary": "without tax advice"
    }
  }
]
