<?php

namespace Tests\Feature;

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

class AdminComponentsCssMiniChartsShouldExistTest extends TestCase
{
    use RefreshDatabase;

    public function test_admin_components_css_should_define_mini_chart_styles(): void
    {
        $path = public_path('css/admin-components.css');
        $this->assertFileExists($path);

        $css = (string) file_get_contents($path);

        // 趋势迷你图
        $this->assertStringContainsString('.adm-mini-chart', $css);
        $this->assertStringContainsString('.adm-mini-chart-bar', $css);

        // 排行迷你图
        $this->assertStringContainsString('.adm-mini-rank', $css);
        $this->assertStringContainsString('.adm-mini-rank-bar', $css);

        // 占比迷你图
        $this->assertStringContainsString('.adm-mini-share', $css);
        $this->assertStringContainsString('.adm-mini-share-bar', $css);
    }
}
