<?php

namespace Tests\Feature;

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

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

        $this->get('/admin/platform-orders')
            ->assertOk()
            ->assertSee('name="renewal_missing_subscription"', false)
            ->assertSee('只看续费缺订阅', false);
    }
}
