站点管理补充已付无回执治理入口
This commit is contained in:
@@ -98,6 +98,7 @@
|
||||
<a class="muted" href="{!! $makeSubscriptionsUrl((int) $merchant->id) !!}">订阅</a>
|
||||
<a class="muted" href="{!! $makePlatformOrdersUrl((int) $merchant->id) !!}">平台订单</a>
|
||||
<a class="muted" href="{!! $makePlatformOrdersUrl((int) $merchant->id, ['renewal_missing_subscription' => '1']) !!}">续费缺订阅</a>
|
||||
<a class="muted" href="{!! $makePlatformOrdersUrl((int) $merchant->id, ['payment_status' => 'paid', 'receipt_status' => 'none']) !!}">已付无回执</a>
|
||||
</div>
|
||||
<div class="muted muted-xs">当前阶段请使用该站点管理员账号登录</div>
|
||||
</td>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\Merchant;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminMerchantIndexGovernanceLinksShouldIncludePaidNoReceiptTest 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_merchant_index_governance_links_should_include_paid_no_receipt(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$merchant = Merchant::query()->create([
|
||||
'name' => '站点治理已付无回执测试站点',
|
||||
'slug' => 'merchant-paid-no-receipt-link',
|
||||
'plan' => 'pro',
|
||||
'status' => 'active',
|
||||
'contact_name' => '张三',
|
||||
'contact_phone' => '13800138000',
|
||||
'contact_email' => 'merchant-paid-no-receipt@example.com',
|
||||
]);
|
||||
|
||||
$res = $this->get('/admin/merchants');
|
||||
$res->assertOk();
|
||||
|
||||
$html = (string) $res->getContent();
|
||||
$this->assertStringContainsString('已付无回执', $html);
|
||||
|
||||
$expectedBack = urlencode('/admin/merchants');
|
||||
$this->assertStringContainsString('/admin/platform-orders?merchant_id=' . $merchant->id . '&payment_status=paid&receipt_status=none&back=' . $expectedBack, $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user