From ffb6999b5abe675803359a88eaf7ff462f0f2256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Tue, 17 Mar 2026 20:18:52 +0800 Subject: [PATCH] fix(admin): remove duplicate route and update batch show tests for linked counts --- routes/web.php | 5 +---- ...hShowPageShouldRenderBasSummaryAndGovernanceLinksTest.php | 4 +++- ...ShowPageShouldRenderBmpaSummaryAndGovernanceLinksTest.php | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/routes/web.php b/routes/web.php index 7f30391..f5548e1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -113,12 +113,9 @@ Route::prefix('admin')->group(function () { Route::get('/platform-orders', [PlatformOrderController::class, 'index']); Route::get('/platform-orders/export', [PlatformOrderController::class, 'export']); - // 批次复盘页:run_id -> last_result -> 一键跳转治理集合 - Route::get('/platform-batches/show', [\App\Http\Controllers\Admin\PlatformBatchController::class, 'show']); - Route::get('/platform-orders/create', [PlatformOrderController::class, 'create']); - // 批次详情(可复盘):BAS/BMPA run_id → last_result + 一键治理入口 Route::get('/platform-batches/show', [\App\Http\Controllers\Admin\PlatformBatchController::class, 'show']); + Route::get('/platform-orders/create', [PlatformOrderController::class, 'create']); Route::post('/platform-orders', [PlatformOrderController::class, 'store']); Route::post('/platform-orders/batch-activate-subscriptions', [PlatformOrderController::class, 'batchActivateSubscriptions']); Route::post('/platform-orders/batch-mark-paid-and-activate', [PlatformOrderController::class, 'batchMarkPaidAndActivate']); diff --git a/tests/Feature/AdminPlatformBatchShowPageShouldRenderBasSummaryAndGovernanceLinksTest.php b/tests/Feature/AdminPlatformBatchShowPageShouldRenderBasSummaryAndGovernanceLinksTest.php index fc088fc..95ca33a 100644 --- a/tests/Feature/AdminPlatformBatchShowPageShouldRenderBasSummaryAndGovernanceLinksTest.php +++ b/tests/Feature/AdminPlatformBatchShowPageShouldRenderBasSummaryAndGovernanceLinksTest.php @@ -91,7 +91,9 @@ class AdminPlatformBatchShowPageShouldRenderBasSummaryAndGovernanceLinksTest ext $this->assertStringContainsString('本次处理', $html); $this->assertStringContainsString('4', $html); $this->assertStringContainsString('成功 / 失败', $html); - $this->assertStringContainsString('3 / 1', $html); + // 数字现在渲染为两个可点击链接(中间用 / ),因此不再出现纯文本 "3 / 1"。 + $this->assertStringContainsString('data-role="batch-success-count-link"', $html); + $this->assertStringContainsString('data-role="batch-failed-count-link"', $html); // 治理链接 $this->assertStringContainsString('batch_activation_run_id=' . $runId, $html); diff --git a/tests/Feature/AdminPlatformBatchShowPageShouldRenderBmpaSummaryAndGovernanceLinksTest.php b/tests/Feature/AdminPlatformBatchShowPageShouldRenderBmpaSummaryAndGovernanceLinksTest.php index 42a75b9..9ca895d 100644 --- a/tests/Feature/AdminPlatformBatchShowPageShouldRenderBmpaSummaryAndGovernanceLinksTest.php +++ b/tests/Feature/AdminPlatformBatchShowPageShouldRenderBmpaSummaryAndGovernanceLinksTest.php @@ -85,9 +85,10 @@ class AdminPlatformBatchShowPageShouldRenderBmpaSummaryAndGovernanceLinksTest ex $this->assertStringContainsString('BMPA(批量标记支付并生效) 批次详情', $html); $this->assertStringContainsString('run_id:' . $runId . '', $html); - // 汇总数字 + // 汇总数字(现在渲染为两个可点击链接,不再出现纯文本 "2 / 2") $this->assertStringContainsString('成功 / 失败', $html); - $this->assertStringContainsString('2 / 2', $html); + $this->assertStringContainsString('data-role="batch-success-count-link"', $html); + $this->assertStringContainsString('data-role="batch-failed-count-link"', $html); // 治理链接 $this->assertStringContainsString('batch_bmpa_run_id=' . $runId, $html);