import { describe, it, expect } from 'vitest';
import { mount } from '@vue/test-utils';
import { createVuetify } from 'vuetify';
import ProjectCard from '../../resources/js/components/projects/ProjectCard.vue';

const sample = {
    id: 1,
    name: 'Окна СПб',
    signal_type: 'site' as const,
    signal_identifier: 'okna.ru',
    is_active: true,
    daily_limit_target: 50,
    delivered_today: 12,
    sync_status: 'ok' as const,
};

describe('ProjectCard — redesigned', () => {
    it('root has ld-hover-lift class', () => {
        const w = mount(ProjectCard, {
            props: { project: sample, selected: false },
            global: { plugins: [createVuetify()], stubs: { RouterLink: true } },
        });
        expect(w.classes()).toContain('ld-hover-lift');
    });

    it('numeric counter uses ld-mono class', () => {
        const w = mount(ProjectCard, {
            props: { project: sample, selected: false },
            global: { plugins: [createVuetify()], stubs: { RouterLink: true } },
        });
        expect(w.html()).toMatch(/ld-mono/);
    });
});
