<?php

namespace Tests\Feature;

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

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

        $this->get('/admin/platform-orders')
            ->assertOk()
            ->assertSee('/admin/platform-orders?batch_mark_activated_24h=1', false)
            ->assertSee('近24小时批量生效', false);
    }
}
