测试: 仪表盘已付无回执按钮data-role护栏

This commit is contained in:
萝卜
2026-03-18 15:15:08 +08:00
parent f640f75635
commit b3cb109816

View File

@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardBillingWorkbenchPaidNoReceiptButtonShouldHaveDataRoleTest extends TestCase
{
use RefreshDatabase;
protected function loginAsPlatformAdmin(): void
{
$this->seed();
$this->post('/admin/login', [
'email' => 'platform.admin@demo.local',
'password' => 'Platform@123456',
])->assertRedirect('/admin');
}
public function test_dashboard_paid_no_receipt_button_should_have_data_role(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('data-role="dashboard-po-quicklink-paid-no-receipt"', false);
$res->assertSee('已付无回执', false);
$res->assertSee('payment_status=paid', false);
$res->assertSee('receipt_status=none', false);
}
}