Files
saasshop/tests/Feature/AdminDashboardBillingWorkbenchQuickLinksShouldBeGovernanceOrientedTest.php

48 lines
1.7 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 AdminDashboardBillingWorkbenchQuickLinksShouldBeGovernanceOrientedTest 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_quick_links_should_be_governance_oriented(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
// 快捷区:只保留“点完能做事”的治理入口(<=7当前为 6
$this->assertStringContainsString('data-role="dashboard-po-quick-links"', $html);
$this->assertStringContainsString('待支付', $html);
$this->assertStringContainsString('可同步', $html);
$this->assertStringContainsString('同步失败', $html);
$this->assertStringContainsString('无回执', $html);
$this->assertStringContainsString('对账不一致', $html);
$this->assertStringContainsString('退款不一致', $html);
// 高级筛选:默认收起(存在即可),承载“非高频动作入口”
$this->assertStringContainsString('data-role="dashboard-po-advanced-links"', $html);
$this->assertStringContainsString('高级筛选', $html);
$this->assertStringContainsString('待生效', $html);
$this->assertStringContainsString('续费缺订阅', $html);
$this->assertStringContainsString('BMPA失败', $html);
}
}