<?php

namespace Tests\Feature;

use Tests\TestCase;

class DashboardChartUiTest extends TestCase
{
    public function test_dashboard_chart_renderer_caps_bar_width_and_supports_common_chart_types(): void
    {
        $javascript = file_get_contents(public_path('assets/microfinance/app.js'));
        $css = file_get_contents(public_path('assets/microfinance/ui.css'));

        $this->assertStringContainsString("const dashboardChartTypes = ['bar', 'line', 'area'];", $javascript);
        $this->assertStringContainsString('const barWidth = Math.min(60', $javascript);
        $this->assertStringContainsString('data-dashboard-chart-enhanced', $css);
        $this->assertStringContainsString('.mf-dashboard-chart-switcher', $css);
        $this->assertStringContainsString('.mf-dashboard-chart-svg', $css);
    }
}
