<?php

namespace Tests\Feature;

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

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

        $css = file_get_contents(public_path('css/admin-theme.css'));
        $this->assertIsString($css);

        $this->assertStringContainsString('--adm-shadow-popover', $css);
        $this->assertStringContainsString('--adm-surface-tint', $css);
    }
}
