Publish ITWorx Pulse source
Public source validation / validate (push) Failing after 3m8s

This commit is contained in:
ITWorx Pulse release export
2026-09-03 02:09:19 +02:00
commit bd774932d5
614 changed files with 77116 additions and 0 deletions
@@ -0,0 +1,24 @@
import { render, screen } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { SourceStatusDetails } from '../../src/SourceStatusDetails';
describe('SourceStatusDetails', () => {
it('scheidt bronstatus van databruikbaarheid en houdt de code ingeklapt', () => {
render(<SourceStatusDetails source={{ id: 'unraid', state: 'healthy', freshness: 'stale', observedAt: '2026-08-21T13:00:00Z', reason: 'source_stale' }} />);
expect(screen.getByText(/Bronstatus:/).closest('span')).toHaveTextContent('Gezond');
expect(screen.getByText(/Data:/).closest('span')).toHaveTextContent('Verouderd');
expect(screen.getByText(/laatste meting is verouderd/i)).toBeVisible();
const code = screen.getByText('source_stale');
expect(code.closest('details')).not.toHaveAttribute('open');
expect(code).not.toBeVisible();
});
it('toont nooit ontvangen zonder een misleidend time-element', () => {
const { container } = render(<SourceStatusDetails source={{ id: 'host', state: 'unknown', freshness: 'unavailable', observedAt: '0001-01-01T00:00:00Z' }} />);
expect(screen.getByText('Nooit ontvangen')).toBeVisible();
expect(container.querySelector('time')).toBeNull();
});
});