修正平台订单收入风险三节点护栏断言方式

This commit is contained in:
萝卜
2026-03-19 02:45:50 +08:00
parent 7d847801bb
commit 5431503917

View File

@@ -0,0 +1,37 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderQuickFiltersShouldKeepRevenueRiskTripletTest 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_platform_orders_quick_filters_should_keep_revenue_risk_triplet(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-quickfilter-unpaid"', $html);
$this->assertStringContainsString('待支付', $html);
$this->assertStringContainsString('data-role="po-quickfilter-paid-no-receipt"', $html);
$this->assertStringContainsString('已付无回执', $html);
$this->assertStringContainsString('data-role="po-quickfilter-renewal-missing-sub"', $html);
$this->assertStringContainsString('续费缺订阅', $html);
}
}