platform_orders index: add is-compact class and compact density styles

This commit is contained in:
萝卜
2026-03-14 12:52:59 +00:00
parent f89cfc206a
commit 70d67db89b
3 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexCompactViewHasIsCompactClassTest 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_compact_view_table_has_is_compact_class_full_view_has_is_full(): void
{
$this->loginAsPlatformAdmin();
$this->get('/admin/platform-orders')
->assertOk()
->assertSee('platform-orders-table is-compact', false)
->assertDontSee('platform-orders-table is-full', false);
$this->get('/admin/platform-orders?view=full')
->assertOk()
->assertSee('platform-orders-table is-full', false)
->assertDontSee('platform-orders-table is-compact', false);
}
}