补强页内导航说明完整组件护栏

This commit is contained in:
萝卜
2026-03-19 18:15:17 +08:00
parent 85bba5596c
commit 4ccf9c28af

View File

@@ -0,0 +1,38 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexPageJumpNoteShouldRenderCompleteBackNavigationComponentTest 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_page_jump_note_should_render_complete_back_navigation_component(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-page-jump-note"', $html);
$this->assertStringContainsString('仅用于页内快速跳转,不会改变当前筛选状态;', $html);
$this->assertStringContainsString('data-role="po-page-jump-back-to-top"', $html);
$this->assertStringContainsString('data-role="po-page-jump-back-to-quick-filters"', $html);
$this->assertStringContainsString('data-role="po-page-jump-back-to-summary"', $html);
$this->assertStringContainsString('data-role="po-page-jump-back-to-tools"', $html);
$this->assertStringContainsString('data-role="po-page-jump-back-to-list"', $html);
}
}