admin-components: set platform-orders-table min-width per view (compact/full)

This commit is contained in:
萝卜
2026-03-14 13:41:10 +00:00
parent 26f283d283
commit 9944e7221f
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminComponentsCssPlatformOrdersTableMinWidthTest 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_defines_min_width_for_compact_and_full_platform_orders_table(): void
{
$this->loginAsPlatformAdmin();
$css = file_get_contents(public_path('css/admin-components.css'));
$this->assertIsString($css);
$this->assertStringContainsString('.platform-orders-table.is-compact{', $css);
$this->assertStringContainsString('min-width:1400px', $css);
$this->assertStringContainsString('.platform-orders-table.is-full{', $css);
$this->assertStringContainsString('min-width:2000px', $css);
}
}