<?php

namespace Tests\Feature;

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

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

        $res = $this->get('/admin/platform-orders');
        $res->assertOk();

        $html = (string) $res->getContent();
        $this->assertStringContainsString('已付无回执', $html);
        $this->assertStringNotContainsString('data-role="po-quickfilter-receipt-none"', $html);
    }
}
