<?php

namespace Tests\Feature;

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

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

        $res = $this->get('/admin/settings/channels');
        $res->assertOk();

        // 护栏：渠道配置页应使用 PageHeader 与 ListCard，保持总台管理风格统一。
        $res->assertSee('page-header', false);
        $res->assertSee('page-header-title', false);
        $res->assertSee('page-header-subtitle', false);
        $res->assertSee('page-header-actions', false);
        $res->assertSee('page-header-meta', false);

        $res->assertSee('list-card', false);
        $res->assertSee('list-card-header', false);
        $res->assertSee('list-card-body', false);
        $res->assertSee('list-card-table', false);
    }
}
