feat(platform_orders): add link from refund total card to refund orders
This commit is contained in:
@@ -338,6 +338,9 @@
|
||||
<h3>退款总额</h3>
|
||||
<div class="metric-number">¥{{ number_format((float) ($summaryStats['total_refunded_amount'] ?? 0), 2) }}</div>
|
||||
<div class="muted muted-xs">基于 meta.refund_summary.total_amount(缺省回退汇总)</div>
|
||||
<div class="muted muted-xs">
|
||||
<a class="link" href="{!! $safeFullUrlWithQuery(['refund_status' => 'has', 'page' => null]) !!}">查看有退款订单</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>有退款订单 / 无退款订单</h3>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderRefundTotalCardHasLinkToRefundOrdersTest 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_refund_total_card_should_link_to_refund_orders_list(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$this->get('/admin/platform-orders')
|
||||
->assertOk()
|
||||
->assertSee('退款总额')
|
||||
->assertSee('查看有退款订单')
|
||||
->assertSee('refund_status=has');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user