<?php

namespace Tests\Feature;

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

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

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

        // 运营导向：标题副文案应提示关键治理集合，减少“页面上来不知道从哪下手”的认知成本。
        $res->assertSee('待支付', false);
        $res->assertSee('待生效', false);
        $res->assertSee('可同步', false);
        $res->assertSee('同步失败', false);
        $res->assertSee('续费缺订阅', false);
    }
}
