From aa583e2b72e0be4f00c2921efede3f080e290e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 21:59:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E7=82=B9=E7=AE=A1=E7=90=86=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E5=B7=B2=E4=BB=98=E6=97=A0=E5=9B=9E=E6=89=A7=E6=B2=BB?= =?UTF-8?q?=E7=90=86=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/admin/merchants/index.blade.php | 1 + ...nceLinksShouldIncludePaidNoReceiptTest.php | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tests/Feature/AdminMerchantIndexGovernanceLinksShouldIncludePaidNoReceiptTest.php diff --git a/resources/views/admin/merchants/index.blade.php b/resources/views/admin/merchants/index.blade.php index fe41939..013cd31 100644 --- a/resources/views/admin/merchants/index.blade.php +++ b/resources/views/admin/merchants/index.blade.php @@ -98,6 +98,7 @@ 订阅 平台订单 续费缺订阅 + 已付无回执
当前阶段请使用该站点管理员账号登录
diff --git a/tests/Feature/AdminMerchantIndexGovernanceLinksShouldIncludePaidNoReceiptTest.php b/tests/Feature/AdminMerchantIndexGovernanceLinksShouldIncludePaidNoReceiptTest.php new file mode 100644 index 0000000..724f8b8 --- /dev/null +++ b/tests/Feature/AdminMerchantIndexGovernanceLinksShouldIncludePaidNoReceiptTest.php @@ -0,0 +1,46 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_merchant_index_governance_links_should_include_paid_no_receipt(): void + { + $this->loginAsPlatformAdmin(); + + $merchant = Merchant::query()->create([ + 'name' => '站点治理已付无回执测试站点', + 'slug' => 'merchant-paid-no-receipt-link', + 'plan' => 'pro', + 'status' => 'active', + 'contact_name' => '张三', + 'contact_phone' => '13800138000', + 'contact_email' => 'merchant-paid-no-receipt@example.com', + ]); + + $res = $this->get('/admin/merchants'); + $res->assertOk(); + + $html = (string) $res->getContent(); + $this->assertStringContainsString('已付无回执', $html); + + $expectedBack = urlencode('/admin/merchants'); + $this->assertStringContainsString('/admin/platform-orders?merchant_id=' . $merchant->id . '&payment_status=paid&receipt_status=none&back=' . $expectedBack, $html); + } +}