57f554ea7c
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
22 lines
1.0 KiB
TypeScript
22 lines
1.0 KiB
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { mount } from '@vue/test-utils';
|
|
import { createVuetify } from 'vuetify';
|
|
import TenantsStatsHeader from '../../resources/js/components/admin/tenants/TenantsStatsHeader.vue';
|
|
|
|
const vuetify = createVuetify();
|
|
const baseProps = {
|
|
stats: { total: 12, active: 5, trial: 3, overdue: 2, monthlyRevenueRub: 100000 },
|
|
loading: false,
|
|
};
|
|
|
|
describe('TenantsStatsHeader a11y', () => {
|
|
it('счётчик активных использует AA-класс stat-success, не низкоконтрастный text-success', () => {
|
|
const w = mount(TenantsStatsHeader, { props: baseProps, global: { plugins: [vuetify] } });
|
|
const active = w.find('.stat-success');
|
|
expect(active.exists()).toBe(true);
|
|
expect(active.text()).toBe('5');
|
|
// Vuetify-утилита text-success давала ≈3.83:1 на ивори — заменена локальным AA-классом.
|
|
expect(w.find('.num.text-success').exists()).toBe(false);
|
|
});
|
|
});
|