From 0c224db94ca1ebf9201ee9c9b34d4f62dc8c1a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 15:50:54 +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=AF=E5=90=8C=E6=AD=A5/=E5=90=8C=E6=AD=A5=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=8C=89=E9=92=AE=20data-role=20=E4=B8=8E=E5=8F=A3?= =?UTF-8?q?=E5=BE=84=E6=8A=A4=E6=A0=8F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...yncFailedButtonsShouldHaveDataRoleTest.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/Feature/AdminDashboardBillingWorkbenchSyncableAndSyncFailedButtonsShouldHaveDataRoleTest.php diff --git a/tests/Feature/AdminDashboardBillingWorkbenchSyncableAndSyncFailedButtonsShouldHaveDataRoleTest.php b/tests/Feature/AdminDashboardBillingWorkbenchSyncableAndSyncFailedButtonsShouldHaveDataRoleTest.php new file mode 100644 index 0000000..3b6e2a2 --- /dev/null +++ b/tests/Feature/AdminDashboardBillingWorkbenchSyncableAndSyncFailedButtonsShouldHaveDataRoleTest.php @@ -0,0 +1,38 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_dashboard_billing_workbench_syncable_and_sync_failed_buttons_should_have_data_role(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="dashboard-po-quicklink-syncable"', $html); + $this->assertStringContainsString('data-role="dashboard-po-quicklink-sync-failed"', $html); + + // 基础语义也钉一下,防止误改 query + $this->assertStringContainsString('syncable_only=1', $html); + $this->assertStringContainsString('sync_status=failed', $html); + } +}