19 lines
671 B
PHP
19 lines
671 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Tests\TestCase;
|
|
|
|
class AdminJsShouldAutoOpenAddPaymentReceiptDetailsWhenHashPresentTest extends TestCase
|
|
{
|
|
public function test_admin_js_should_auto_open_add_payment_receipt_details_when_hash_present(): void
|
|
{
|
|
$js = (string) file_get_contents(public_path('js/admin.js'));
|
|
|
|
// 护栏:当 hash 为 #add-payment-receipt 时,应自动展开 details#add-payment-receipt。
|
|
$this->assertStringContainsString("h === '#add-payment-receipt'", $js);
|
|
$this->assertStringContainsString("qs('details#add-payment-receipt')", $js);
|
|
$this->assertStringContainsString('d.open = true', $js);
|
|
}
|
|
}
|