Files
saasshop/tests/Feature/AdminPlatformOrderIndexToolGridJumpLinksShouldRenderCompleteNavigationSetTest.php
2026-03-19 09:11:11 +08:00

40 lines
1.5 KiB
PHP

<?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);
}
}