admin-components: set platform-orders-table min-width per view (compact/full)
This commit is contained in:
@@ -85,6 +85,15 @@
|
||||
min-width:1600px;
|
||||
}
|
||||
|
||||
/* 平台订单列表:根据视图控制 min-width(精简视图更紧凑,full 视图更宽) */
|
||||
.platform-orders-table.is-compact{
|
||||
min-width:1400px;
|
||||
}
|
||||
|
||||
.platform-orders-table.is-full{
|
||||
min-width:2000px;
|
||||
}
|
||||
|
||||
.table-nowrap th,
|
||||
.table-nowrap td{
|
||||
white-space:nowrap;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user