From 6cb503e09ad6f20bf310af92aa68b5cfedb032d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 23:07:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E5=B7=B2=E4=BB=98=E6=97=A0=E5=9B=9E=E6=89=A7=E5=8F=AF=E8=A7=81?= =?UTF-8?q?=E6=96=87=E6=A1=88=E5=8F=A3=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/admin/dashboard.blade.php | 4 +-- ...eLabelShouldUsePaidNoReceiptPhraseTest.php | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 tests/Feature/AdminDashboardPaidNoReceiptVisibleLabelShouldUsePaidNoReceiptPhraseTest.php diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index cb408cf..62914d8 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -443,7 +443,7 @@ 'barRole' => 'dashboard-po-no-receipt-bar', 'href' => $platformOrdersQuickLinks['paid_no_receipt'], 'ariaLabel' => '进入已付无回执订单集合', - 'label' => '无回执', + 'label' => '已付无回执', 'pct' => $poNoReceiptPct, 'title' => $poNoReceipt . ' / ' . $poTotal . '(' . $poNoReceiptPct . '%)', 'value' => $poNoReceiptPct . '%(' . $poNoReceipt . ')', @@ -758,7 +758,7 @@ 'barRole' => 'ops-risk-no-receipt-bar', 'href' => $platformOrdersQuickLinks['paid_no_receipt'], 'ariaLabel' => '进入已付无回执订单集合', - 'label' => '无回执', + 'label' => '已付无回执', 'pct' => $pctRiskNoReceipt, 'title' => $riskNoReceipt . ' / ' . $poTotalForOps . '(' . $pctRiskNoReceipt . '%)', 'value' => $pctRiskNoReceipt . '%(' . $riskNoReceipt . ')', diff --git a/tests/Feature/AdminDashboardPaidNoReceiptVisibleLabelShouldUsePaidNoReceiptPhraseTest.php b/tests/Feature/AdminDashboardPaidNoReceiptVisibleLabelShouldUsePaidNoReceiptPhraseTest.php new file mode 100644 index 0000000..f66d6b9 --- /dev/null +++ b/tests/Feature/AdminDashboardPaidNoReceiptVisibleLabelShouldUsePaidNoReceiptPhraseTest.php @@ -0,0 +1,33 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_dashboard_paid_no_receipt_visible_label_should_use_paid_no_receipt_phrase(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + $res->assertOk(); + + $html = (string) $res->getContent(); + $this->assertMatchesRegularExpression('/data-role="dashboard-po-no-receipt-row"[\s\S]*?已付无回执/u', $html); + $this->assertMatchesRegularExpression('/data-role="ops-risk-no-receipt-row"[\s\S]*?已付无回执/u', $html); + } +}