Files
saasshop/tests/Feature/AdminDashboardBillingWorkbenchBmpaProcessableButtonShouldHaveDataRoleAndQueryTest.php

37 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardBillingWorkbenchBmpaProcessableButtonShouldHaveDataRoleAndQueryTest 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_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);
}
}