From 6188919445cf9e38661b8fe08b5601500c7c0fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 15:52:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E9=BD=90=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E5=8F=AFBMPA=E5=A4=84=E7=90=86=E6=8C=89=E9=92=AE=20data-role?= =?UTF-8?q?=20=E4=B8=8E=E5=8F=A3=E5=BE=84=E6=8A=A4=E6=A0=8F=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...leButtonShouldHaveDataRoleAndQueryTest.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/Feature/AdminDashboardBillingWorkbenchBmpaProcessableButtonShouldHaveDataRoleAndQueryTest.php diff --git a/tests/Feature/AdminDashboardBillingWorkbenchBmpaProcessableButtonShouldHaveDataRoleAndQueryTest.php b/tests/Feature/AdminDashboardBillingWorkbenchBmpaProcessableButtonShouldHaveDataRoleAndQueryTest.php new file mode 100644 index 0000000..52f2c88 --- /dev/null +++ b/tests/Feature/AdminDashboardBillingWorkbenchBmpaProcessableButtonShouldHaveDataRoleAndQueryTest.php @@ -0,0 +1,36 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_dashboard_billing_workbench_bmpa_processable_button_should_have_data_role_and_query(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="dashboard-po-quicklink-bmpa-processable"', $html); + + // 口径:可BMPA处理入口应指向 bmpa_processable_only=1 集合(避免只靠“unpaid_pending”等内部别名导致语义漂移) + $this->assertStringContainsString('bmpa_processable_only=1', $html); + } +}