收紧工具区导航完整集测试写法

This commit is contained in:
萝卜
2026-03-19 09:11:11 +08:00
parent 0bab0a329c
commit 8e5cbdab03

View File

@@ -0,0 +1,39 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexToolGridJumpLinksShouldRenderCompleteNavigationSetTest 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_render_complete_navigation_set(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-tools-grid-jump-links"', $html);
$this->assertStringContainsString('data-role="po-tools-jump-export"', $html);
$this->assertStringContainsString('data-role="po-tools-jump-batch-activate"', $html);
$this->assertStringContainsString('data-role="po-tools-jump-batch-bmpa"', $html);
$this->assertStringContainsString('data-role="po-tools-jump-batch-mark-activated"', $html);
$this->assertStringContainsString('data-role="po-tools-jump-clear-sync-errors"', $html);
$this->assertStringContainsString('data-role="po-tools-jump-clear-bmpa-errors"', $html);
$this->assertStringContainsString('data-role="po-tools-grid-jump-links-note"', $html);
}
}