From 59910e05aa06ad873b21856a96e8f9be732e9ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 04:19:27 +0800 Subject: [PATCH] feat(platform-orders): add copy run_id buttons in bas/bmpa run badges --- .../admin/platform_orders/index.blade.php | 2 + ...RunIdBadgesShouldRenderCopyButtonsTest.php | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/Feature/AdminPlatformOrderIndexBatchRunIdBadgesShouldRenderCopyButtonsTest.php diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index bb07373..a2224e3 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -548,6 +548,7 @@
当前 BAS run_id:{{ $batchActivationRunId }} + 清除 BAS 批次筛选
@@ -602,6 +603,7 @@
当前 BMPA run_id:{{ $batchBmpaRunId }} + 清除 BMPA 批次筛选
diff --git a/tests/Feature/AdminPlatformOrderIndexBatchRunIdBadgesShouldRenderCopyButtonsTest.php b/tests/Feature/AdminPlatformOrderIndexBatchRunIdBadgesShouldRenderCopyButtonsTest.php new file mode 100644 index 0000000..127ffae --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexBatchRunIdBadgesShouldRenderCopyButtonsTest.php @@ -0,0 +1,38 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_page_batch_run_id_badges_should_render_copy_buttons(): void + { + $this->loginAsPlatformAdmin(); + + $html = $this->get('/admin/platform-orders?batch_activation_run_id=BAS_COPY_0001&batch_bmpa_run_id=BMPA_COPY_0001') + ->assertOk() + ->getContent(); + + // BAS 徽章区 copy + $this->assertStringContainsString('data-copy-label="BAS run_id"', $html); + $this->assertStringContainsString('data-copy-text="BAS_COPY_0001"', $html); + + // BMPA 徽章区 copy + $this->assertStringContainsString('data-copy-label="BMPA run_id"', $html); + $this->assertStringContainsString('data-copy-text="BMPA_COPY_0001"', $html); + } +}