Files
saasshop/tests/Feature/AdminComponentsCssListCardTableEmptyStateShouldBeCenteredTest.php

35 lines
1.0 KiB
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 AdminComponentsCssListCardTableEmptyStateShouldBeCenteredTest 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_components_css_list_card_table_empty_state_should_be_centered(): void
{
$this->loginAsPlatformAdmin();
$css = file_get_contents(public_path('css/admin-components.css'));
$this->assertIsString($css);
// 空状态行table-empty应统一居中 + 留白,避免每页空态体验不一致。
$this->assertStringContainsString('.list-card-table .table-empty{', $css);
$this->assertStringContainsString('text-align:center', $css);
$this->assertStringContainsString('padding:24px 12px', $css);
}
}