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); + } +}