Files
saasshop/tests/Feature/AdminBaseCssShouldIncludeW180WidthUtilityTest.php

33 lines
894 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 Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminBaseCssShouldIncludeW180WidthUtilityTest extends TestCase
{
use RefreshDatabase;
protected function loginAsPlatformAdmin(): void
{
$this->seed();
$this->post('/admin/login', [
'email' => 'platform.admin@demo.local',
'password' => 'Platform@123456',
])->assertRedirect('/admin');
}
public function test_admin_base_css_should_include_w180_width_utility(): void
{
$this->loginAsPlatformAdmin();
$css = file_get_contents(public_path('css/admin-base.css'));
$this->assertIsString($css);
// 平台订单筛选区使用 w-180created_from/to必须提供该工具类避免样式缺失。
$this->assertStringContainsString('.w-180{width:180px;}', $css);
}
}