<?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class AdminPlatformOrderReceiptSummaryCardLinksTest 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_page_shows_receipt_summary_card_links(): void
    {
        $this->loginAsPlatformAdmin();

        $this->get('/admin/platform-orders')
            ->assertOk()
            ->assertSee('有回执订单 / 回执总额')
            ->assertSee('已付无回执订单')
            ->assertSee('receipt_status=has')
            ->assertSee('payment_status=paid')
            ->assertSee('receipt_status=none');
    }
}
