From 919f3e298fa8911f72d57174f9d2e4b819a9dbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Thu, 19 Mar 2026 05:35:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=BC=BA=E5=B7=B2=E4=BB=98=E6=97=A0?= =?UTF-8?q?=E5=9B=9E=E6=89=A7=E4=B8=BB=E5=8A=A8=E4=BD=9C=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E9=94=9A=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_tool_anchor_button.blade.php | 2 +- .../admin/platform_orders/index.blade.php | 17 ++++++---- ...intPrimaryActionShouldHaveDataRoleTest.php | 33 +++++++++++++++++++ 3 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintPrimaryActionShouldHaveDataRoleTest.php diff --git a/resources/views/admin/platform_orders/_tool_anchor_button.blade.php b/resources/views/admin/platform_orders/_tool_anchor_button.blade.php index 5130f63..3faaf10 100644 --- a/resources/views/admin/platform_orders/_tool_anchor_button.blade.php +++ b/resources/views/admin/platform_orders/_tool_anchor_button.blade.php @@ -1 +1 @@ -{{ $label ?? '' }} +{{ $label ?? '' }} diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index c84d568..25d3c68 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -1061,6 +1061,7 @@ 。建议先完成金额/状态治理(补回执/核对退款/修正状态)后,再执行批量同步订阅等工具动作。
@include('admin.platform_orders._tool_anchor_button', [ + 'role' => 'po-tools-paid-no-receipt-focus-batch-activate', 'href' => '#batch-activate-subscriptions', 'label' => '定位到批量同步订阅工具', 'ariaLabel' => '定位到批量同步订阅工具', @@ -1093,6 +1094,7 @@ 当前集合为「已付无回执」且已勾选「只看可同步」。为保证收费闭环可治理,建议先补齐支付回执留痕,再执行批量同步订阅。
@include('admin.platform_orders._tool_anchor_button', [ + 'role' => 'po-tools-paid-no-receipt-focus-batch-activate', 'href' => '#batch-activate-subscriptions', 'label' => '定位到批量同步订阅工具', 'ariaLabel' => '定位到批量同步订阅工具', @@ -1126,6 +1128,7 @@ 当前筛选包含「同步失败/失败原因」范围。建议先治理失败原因(修复数据或重试同步),再执行批量同步订阅等工具动作。
@include('admin.platform_orders._tool_anchor_button', [ + 'role' => 'po-tools-paid-no-receipt-focus-batch-activate', 'href' => '#batch-activate-subscriptions', 'label' => '定位到批量同步订阅工具', 'ariaLabel' => '定位到批量同步订阅工具', @@ -1193,8 +1196,8 @@ $toolGuards = $toolGuards ?? \App\Support\PlatformOrderToolsGuard::forIndex((array) ($filters ?? [])); @endphp -
-
+
+
导出
@@ -1211,7 +1214,7 @@
-
+
批量同步订阅
@php $batchActivateBlocked = (bool) ($toolGuards['batch_activate_subscriptions']['blocked'] ?? false); @@ -1267,7 +1270,7 @@
-
+
批量标记支付并生效(BMPA)
@php $batchBmpaBlocked = (bool) ($toolGuards['batch_bmpa']['blocked'] ?? false); @@ -1322,7 +1325,7 @@
-
+
批量仅标记为已生效
@php $batchMarkActivatedBlocked = (bool) ($toolGuards['batch_mark_activated']['blocked'] ?? false); @@ -1380,7 +1383,7 @@
-
+
清理失败标记:同步订阅
@php $clearSyncBlocked = (bool) ($toolGuards['clear_sync_errors']['blocked'] ?? false); @@ -1428,7 +1431,7 @@
-
+
清理失败标记:批量 BMPA
@php $clearBmpaBlocked = (bool) ($toolGuards['clear_bmpa_errors']['blocked'] ?? false); diff --git a/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintPrimaryActionShouldHaveDataRoleTest.php b/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintPrimaryActionShouldHaveDataRoleTest.php new file mode 100644 index 0000000..68651ab --- /dev/null +++ b/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintPrimaryActionShouldHaveDataRoleTest.php @@ -0,0 +1,33 @@ +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_primary_action_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-focus-batch-activate"', $html); + $this->assertStringContainsString('定位到批量同步订阅工具', $html); + } +}