补充工具区快速导航筛选条件入口

This commit is contained in:
萝卜
2026-03-19 09:15:59 +08:00
parent 8e5cbdab03
commit c8fff97f23
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexToolGridJumpLinksShouldIncludeFiltersShortcutTest 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_tool_grid_jump_links_should_include_filters_shortcut(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-tools-jump-filters"', $html);
$this->assertStringContainsString('aria-label="定位到筛选条件"', $html);
$this->assertStringContainsString('href="#filters"', $html);
$this->assertStringContainsString('>筛选条件<', $html);
}
}