chore(admin-ui): migrate merchants index to filters/list card and admin pagination
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminMerchantsIndexShouldUseFiltersAndListCardStructureTest 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_merchants_index_should_use_filters_and_list_card_structure(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$response = $this->get('/admin/merchants');
|
||||
$response->assertOk();
|
||||
|
||||
// 护栏:站点管理页应使用统一 Filters Card + List Card 结构,便于全站后台观感一致。
|
||||
$response->assertSee('filters-card', false);
|
||||
$response->assertSee('filters-summary', false);
|
||||
$response->assertSee('filters-body', false);
|
||||
$response->assertSee('filters-grid', false);
|
||||
|
||||
$response->assertSee('list-card', false);
|
||||
$response->assertSee('list-card-header', false);
|
||||
$response->assertSee('list-card-body', false);
|
||||
$response->assertSee('list-card-table', false);
|
||||
|
||||
// 分页统一:此页数据量可能不足导致 hasPages=false,因此用扫描型护栏断言。
|
||||
$blade = file_get_contents(resource_path('views/admin/merchants/index.blade.php'));
|
||||
$this->assertIsString($blade);
|
||||
$this->assertStringContainsString("links('pagination.admin')", $blade);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user