refactor(js): 复制成功toast文案收敛为toastCopied统一口径

This commit is contained in:
萝卜
2026-03-17 17:37:25 +08:00
parent 5a72d89e6f
commit c245d872ca
2 changed files with 36 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminJsToastCopiedHelperShouldExistTest extends TestCase
{
use RefreshDatabase;
public function test_admin_js_should_include_toast_copied_helper(): void
{
$js = file_get_contents(public_path('js/admin.js'));
$this->assertIsString($js);
$this->assertStringContainsString('function toastCopied', $js);
$this->assertStringContainsString("msg = '已复制'", $js);
}
}