补强平台订单已付无回执工具提示锚点

This commit is contained in:
萝卜
2026-03-19 02:55:04 +08:00
parent f040c0d4c3
commit 337a9ffd27
2 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderToolsPaidNoReceiptHintShouldHaveDataRoleTest 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_tools_paid_no_receipt_hint_should_have_data_role(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-tools-paid-no-receipt-hint"', $html);
$this->assertStringContainsString('已付无回执提示', $html);
}
}