补强已付无回执工具动作可测试锚点
This commit is contained in:
@@ -1098,11 +1098,13 @@
|
||||
</div>
|
||||
<div class="mt-6 actions gap-10">
|
||||
@include('admin.platform_orders._summary_text_link', [
|
||||
'role' => 'po-tools-paid-no-receipt-go-receipt-has',
|
||||
'class' => 'btn btn-secondary btn-sm',
|
||||
'href' => $safeFullUrlWithQuery(['receipt_status' => 'has', 'page' => null]),
|
||||
'label' => '切到有回执集合',
|
||||
])
|
||||
@include('admin.platform_orders._summary_text_link', [
|
||||
'role' => 'po-tools-paid-no-receipt-clear-syncable',
|
||||
'class' => 'btn btn-secondary btn-sm',
|
||||
'href' => $safeFullUrlWithQuery(['syncable_only' => null, 'page' => null]),
|
||||
'label' => '取消只看可同步(先治理)',
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderToolsPaidNoReceiptHintActionsShouldHaveDataRoleTest 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_actions_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-go-receipt-has"', $html);
|
||||
$this->assertStringContainsString('data-role="po-tools-paid-no-receipt-clear-syncable"', $html);
|
||||
$this->assertStringContainsString('切到有回执集合', $html);
|
||||
$this->assertStringContainsString('取消只看可同步(先治理)', $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user