from __future__ import annotations

import pytest
from playwright.sync_api import Page

from e2e.tests.订单状态流转.处罚追缴.penalty_case_helpers import (
    resolve_wanyouji_phone,
    run_penalty_approve_case,
)


@pytest.mark.s_flow_070
@pytest.mark.e2e_ledger
@pytest.mark.e2e_chain
def test_s_flow_070_approve_penalty_from_revoke_end(page: Page, settings, bug_reporter) -> None:
    run_penalty_approve_case(
        page,
        settings,
        bug_reporter,
        case_id="S-FLOW-070",
        prerequisite_case_id="S-FLOW-069",
        pending_flow_state="wanzhanggui_penalty_pending_from_revoke_end",
        final_status="penalty_approved_from_revoke_end",
        final_flow_state="wanyouji_penalty_approved_from_revoke_end",
        remark_prefix="引用 S-FLOW-063 通用处罚同意/赔偿",
        approved_text_field="revoke_end_penalty_approved_text",
        approved_record_field="revoke_end_penalty_approved_record_text",
    )
