Files
saasshop/tests/Feature/AdminPlatformOrderSummaryJumpLinksShouldRenderCompleteNavigationComponentTest.php
2026-03-20 00:07:19 +08:00

39 lines
1.4 KiB
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderSummaryJumpLinksShouldRenderCompleteNavigationComponentTest 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_order_summary_jump_links_should_render_complete_navigation_component(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-summary-jump-links"', $html);
$this->assertStringContainsString('data-role="po-summary-jump-prefix"', $html);
$this->assertStringContainsString('data-role="po-summary-jump-note"', $html);
$this->assertStringContainsString('data-role="po-summary-jump-paid-no-receipt"', $html);
$this->assertStringContainsString('data-role="po-summary-jump-reconcile-mismatch"', $html);
$this->assertStringContainsString('data-role="po-summary-jump-syncable"', $html);
$this->assertStringContainsString('data-role="po-summary-jump-renewal-missing-sub"', $html);
}
}