Public source validation / validate (push) Failing after 3m8s
22 lines
1.1 KiB
TypeScript
22 lines
1.1 KiB
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
import { StorageMapWidget, TemperatureHeatmap } from '../../src/StorageVisuals';
|
|
|
|
describe('storagevisualisaties', () => {
|
|
it('localiseert statuscodes in de kaart en het toegankelijke tabelalternatief', () => {
|
|
render(<StorageMapWidget title="Opslag" description="Status per onderdeel" nodes={[{ id: 'pool-1', label: 'Cachepool', kind: 'pool', state: 'degraded' }]} />);
|
|
|
|
expect(screen.getAllByText('Verstoord')).toHaveLength(2);
|
|
expect(screen.getByRole('link', { name: 'Cachepool: Verstoord' })).toBeVisible();
|
|
expect(screen.queryByText('degraded')).not.toBeInTheDocument();
|
|
});
|
|
|
|
it('localiseert de status in het tabelalternatief van de temperatuurkaart', () => {
|
|
render(<TemperatureHeatmap title="Temperaturen" description="Recente metingen" points={[{ id: 'disk-1', label: 'Disk 1', observedAt: '2026-08-12T03:00:00Z', value: 48, status: 'critical' }]} />);
|
|
|
|
expect(screen.getByRole('cell', { name: 'Kritiek' })).toBeVisible();
|
|
expect(screen.queryByRole('cell', { name: 'critical' })).not.toBeInTheDocument();
|
|
});
|
|
});
|