<?php

namespace Tests\Feature;

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

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

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

        $res->assertSee('可BMPA处理');

        // 口径升级：使用单一开关表达“真正可BMPA处理集合”，避免依赖组合筛选导致入口口径分叉。
        $res->assertSee('/admin/platform-orders?bmpa_processable_only=1', false);
    }
}
