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

const vuetify = createVuetify();
const baseProps = {
    search: '',
    filterStatuses: [],
    filterTariffs: [],
    availableTariffs: ['Старт', 'Бизнес'],
};

describe('TenantsFilters a11y', () => {
    it('поле поиска имеет доступное имя (label) для скринридера', () => {
        const w = mount(TenantsFilters, { props: baseProps, global: { plugins: [vuetify] } });
        const label = w.find('.search-input label');
        expect(label.exists()).toBe(true);
        expect(label.text()).toContain('ИНН');
    });
});
