34 lines
964 B
PHP
34 lines
964 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminPlatformOrderToolsPaidNoReceiptHintShouldHaveDataRoleTest 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_have_data_role(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
|
|
$res->assertOk();
|
|
|
|
$html = (string) $res->getContent();
|
|
$this->assertStringContainsString('data-role="po-tools-paid-no-receipt-hint"', $html);
|
|
$this->assertStringContainsString('已付无回执提示', $html);
|
|
}
|
|
}
|