Files
saasshop/tests/Feature/AdminJsReceiptDetailsMapShouldNotAutoOpenOnSectionHashesTest.php

20 lines
825 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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);
}
}