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

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

@@ -1086,7 +1086,7 @@
@endif
@if((($filters['receipt_status'] ?? '') === 'none') && $hasSyncableOnlyFilter)
<div class="card governance-block mb-10">
<div class="card governance-block mb-10" data-role="po-tools-paid-no-receipt-hint">
<div class="muted text-danger governance-block-title"><strong>已付无回执提示</strong></div>
<div class="muted governance-block-body">
当前集合为「已付无回执」且已勾选「只看可同步」。为保证收费闭环可治理,建议先补齐支付回执留痕,再执行批量同步订阅。

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