补充回执筛选说明直达已付无回执入口
This commit is contained in:
@@ -421,7 +421,7 @@
|
||||
<option value="has" @selected(($filters['receipt_status'] ?? '') === 'has')>有回执</option>
|
||||
<option value="none" @selected(($filters['receipt_status'] ?? '') === 'none')>无回执(广义)</option>
|
||||
</select>
|
||||
<div class="muted muted-xs mt-6" data-role="po-receipt-status-broad-none-hint">无回执(广义)会包含未支付订单;收费闭环治理请优先使用“已付无回执”快捷筛选。</div>
|
||||
<div class="muted muted-xs mt-6" data-role="po-receipt-status-broad-none-hint">无回执(广义)会包含未支付订单;收费闭环治理请优先使用<a class="link" data-role="po-receipt-status-broad-none-go-paid-no-receipt" href="{!! $buildQuickFilterUrl(['payment_status' => 'paid', 'receipt_status' => 'none']) !!}">已付无回执</a>快捷筛选。</div>
|
||||
</div>
|
||||
<select name="refund_status">
|
||||
<option value="">全部退款状态</option>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Arr;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderFiltersReceiptStatusHintShouldLinkToPaidNoReceiptQuickFilterTest 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_receipt_status_hint_should_link_to_paid_no_receipt_quick_filter(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin/platform-orders?' . Arr::query([
|
||||
'merchant_id' => 2,
|
||||
'plan_id' => 3,
|
||||
'keyword' => 'alpha',
|
||||
'back' => '/admin/plans',
|
||||
]));
|
||||
$res->assertOk();
|
||||
|
||||
$html = (string) $res->getContent();
|
||||
$this->assertStringContainsString('data-role="po-receipt-status-broad-none-go-paid-no-receipt"', $html);
|
||||
$this->assertStringContainsString('已付无回执</a>快捷筛选', $html);
|
||||
|
||||
preg_match('/data-role="po-receipt-status-broad-none-go-paid-no-receipt"[^>]*href="([^"]+)"/u', $html, $m);
|
||||
$href = html_entity_decode($m[1] ?? '');
|
||||
$parts = parse_url($href);
|
||||
parse_str($parts['query'] ?? '', $q);
|
||||
|
||||
$this->assertSame('2', (string) ($q['merchant_id'] ?? ''));
|
||||
$this->assertSame('3', (string) ($q['plan_id'] ?? ''));
|
||||
$this->assertSame('alpha', (string) ($q['keyword'] ?? ''));
|
||||
$this->assertSame('paid', (string) ($q['payment_status'] ?? ''));
|
||||
$this->assertSame('none', (string) ($q['receipt_status'] ?? ''));
|
||||
$this->assertSame('/admin/plans', (string) ($q['back'] ?? ''));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user