feat(js): 补齐toastWarning/toastError封装(统一反馈口径)

This commit is contained in:
萝卜
2026-03-17 17:22:58 +08:00
parent e93fda474b
commit b34236b32f
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminJsToastWarningAndErrorHelpersShouldExistTest extends TestCase
{
use RefreshDatabase;
public function test_admin_js_should_include_toast_warning_and_error_helpers(): void
{
$js = file_get_contents(public_path('js/admin.js'));
$this->assertIsString($js);
$this->assertStringContainsString('function toastWarning', $js);
$this->assertStringContainsString("toast('warning'", $js);
$this->assertStringContainsString('function toastError', $js);
$this->assertStringContainsString("toast('error'", $js);
}
}