feat(governance): 批次页跳转列表自动定位到筛选区(anchor)

This commit is contained in:
萝卜
2026-03-17 16:30:15 +08:00
parent 38ac28ada2
commit 408050666f
4 changed files with 54 additions and 21 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexFiltersShouldHaveAnchorIdTest 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_platform_orders_filters_panel_should_have_anchor_id_filters(): void
{
$this->loginAsPlatformAdmin();
$html = $this->get('/admin/platform-orders')
->assertOk()
->getContent();
$this->assertStringContainsString('id="filters"', $html);
$this->assertStringContainsString('data-storage-key="admin.platform_orders.filters"', $html);
}
}