<?php

namespace Tests\Feature;

use Tests\TestCase;

class AdminJsReceiptDetailsMapShouldNotAutoOpenOnSectionHashesTest extends TestCase
{
    public function test_admin_js_receipt_details_map_should_not_auto_open_on_section_hashes(): void
    {
        $js = (string) file_get_contents(public_path('js/admin.js'));

        // 治理：滚动到区块（#refund-receipts）不应强制展开“追加退款记录”面板。
        // 只有显式的动作锚点（#add-xxx-receipt）才自动展开。
        $this->assertStringNotContainsString("'#refund-receipts': 'details#add-refund-receipt'", $js);
        $this->assertStringContainsString("'#add-refund-receipt': 'details#add-refund-receipt'", $js);
        $this->assertStringContainsString("'#add-payment-receipt': 'details#add-payment-receipt'", $js);
    }
}
