Files
saasshop/tests/Feature/AdminJsShouldAutoOpenRefundReceiptDetailsWhenHashPresentTest.php

19 lines
691 B
PHP
Raw 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 AdminJsShouldAutoOpenRefundReceiptDetailsWhenHashPresentTest extends TestCase
{
public function test_admin_js_should_auto_open_refund_receipt_details_when_hash_present(): void
{
$js = (string) file_get_contents(public_path('js/admin.js'));
// 护栏:当 hash 为 #add-refund-receipt 时,应自动展开 details#add-refund-receipt追加退款记录面板
$this->assertStringContainsString("'#add-refund-receipt': 'details#add-refund-receipt'", $js);
$this->assertStringContainsString('if (map[h])', $js);
$this->assertStringContainsString('d.open = true', $js);
}
}