From e8b3c55efde84002689714c6c5cb13c41e793483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sat, 14 Mar 2026 03:47:06 +0000 Subject: [PATCH] =?UTF-8?q?chore(ui):=20=E7=BA=BF=E7=B4=A2=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=88=9B=E5=BB=BA=E8=AE=A2=E5=8D=95=E5=85=A5=E5=8F=A3?= =?UTF-8?q?=E6=94=B9=E7=94=A8=E7=BB=9F=E4=B8=80=E6=8C=89=E9=92=AE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/platform_leads/index.blade.php | 2 +- ...ndexCreateOrderLinkUsesButtonStyleTest.php | 56 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 tests/Feature/AdminPlatformLeadIndexCreateOrderLinkUsesButtonStyleTest.php diff --git a/resources/views/admin/platform_leads/index.blade.php b/resources/views/admin/platform_leads/index.blade.php index 3877120..898528f 100644 --- a/resources/views/admin/platform_leads/index.blade.php +++ b/resources/views/admin/platform_leads/index.blade.php @@ -116,7 +116,7 @@ {{ $l->source }} {{ optional($l->created_at)->format('Y-m-d H:i:s') }} - 创建订单 + 创建订单 @empty diff --git a/tests/Feature/AdminPlatformLeadIndexCreateOrderLinkUsesButtonStyleTest.php b/tests/Feature/AdminPlatformLeadIndexCreateOrderLinkUsesButtonStyleTest.php new file mode 100644 index 0000000..bff86be --- /dev/null +++ b/tests/Feature/AdminPlatformLeadIndexCreateOrderLinkUsesButtonStyleTest.php @@ -0,0 +1,56 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_index_should_render_create_order_link_as_btn_component(): void + { + $this->loginAsPlatformAdmin(); + + $plan = Plan::query()->create([ + 'code' => 'lead_btn_plan', + 'name' => '线索按钮样式测试套餐', + 'billing_cycle' => 'monthly', + 'price' => 10, + 'list_price' => 10, + 'status' => 'active', + 'sort' => 10, + 'published_at' => now(), + ]); + + PlatformLead::query()->create([ + 'name' => '按钮样式线索', + 'mobile' => '13800000002', + 'email' => 'btn@example.com', + 'company' => '样式公司', + 'source' => 'test', + 'status' => 'new', + 'plan_id' => $plan->id, + 'meta' => ['from' => 'test'], + ]); + + $res = $this->get('/admin/platform-leads'); + $res->assertOk(); + + $res->assertSee('class="btn btn-sm"', false); + $res->assertSee('>创建订单<', false); + } +}