from __future__ import annotations

import pytest
from playwright.sync_api import Page

from e2e.tests.订单状态流转.处罚追缴.penalty_case_helpers import run_penalty_reject_case


@pytest.mark.s_flow_056
@pytest.mark.e2e_ledger
@pytest.mark.e2e_chain
def test_s_flow_056_reject_penalty_from_accepted_sub_order(page: Page, settings, bug_reporter) -> None:
    run_penalty_reject_case(
        page,
        settings,
        bug_reporter,
        case_id="S-FLOW-056",
        prerequisite_case_id="S-FLOW-054",
        pending_flow_state="wanzhanggui_penalty_pending_from_accepted_sub_order",
        final_status="penalty_rejected_from_accepted_sub_order",
        final_flow_state="wanyouji_penalty_rejected_from_accepted_sub_order",
        remark_prefix="丸友集驳回验收成功子单处罚",
        rejected_text_field="accepted_sub_order_penalty_rejected_text",
        rejected_record_field="accepted_sub_order_penalty_rejected_record_text",
    )
