Files
saasshop/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintShouldKeepDataRoleAndAriaLabelTogetherTest.php
2026-03-19 04:25:41 +08:00

33 lines
985 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderToolsPaidNoReceiptHintShouldKeepDataRoleAndAriaLabelTogetherTest 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_tools_paid_no_receipt_hint_should_keep_data_role_and_aria_label_together(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertMatchesRegularExpression('/data-role="po-tools-paid-no-receipt-hint"[^>]*aria-label="已付无回执治理提示"/u', $html);
}
}