Files
saasshop/tests/Feature/AdminPlatformOrderIndexBatchBmpaBlockedHintShouldIncludeGoProcessableLinkTest.php

38 lines
1.1 KiB
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexBatchBmpaBlockedHintShouldIncludeGoProcessableLinkTest 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_blocked_hint_should_include_link_to_pending_unpaid_set(): void
{
$this->loginAsPlatformAdmin();
// 构造一个会触发 batch_bmpa 被阻断的筛选:不给 pending+unpaid。
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="batch-bmpa-blocked-hint"', $html);
$this->assertStringContainsString('切到可BMPA处理集合', $html);
$this->assertStringContainsString('status=pending', $html);
$this->assertStringContainsString('payment_status=unpaid', $html);
}
}