Files
ISA-Frontend/libs/ui/empty-state/src/lib/empty-state.component.spec.ts
Lorenz Hilpert d38fed297d Add input controls and checkbox component
Introduced a new input controls library with a checkbox component.

-  **Feature**: Added input controls library with checkbox component
- 🎨 **Style**: Updated checkbox component styles and structure
- 🧪 **Test**: Added unit tests for checkbox and empty state components
- 🛠️ **Refactor**: Improved checkbox component code and removed unused styles
- 📚 **Docs**: Updated commit message guidelines in VSCode settings
2025-03-31 12:29:22 +02:00

30 lines
923 B
TypeScript

import { createComponentFactory, Spectator } from '@ngneat/spectator/jest';
import { EmptyStateComponent } from './empty-state.component';
describe('EmptyStateComponent', () => {
let spectator: Spectator<EmptyStateComponent>;
const createComponent = createComponentFactory(EmptyStateComponent);
beforeEach(() => {
spectator = createComponent({
props: {
title: 'Test Title',
description: 'Test Description',
},
});
});
it('should create the component', () => {
expect(spectator.component).toBeTruthy();
});
it('should set title and description inputs correctly', () => {
expect(spectator.component.title()).toEqual('Test Title');
expect(spectator.component.description()).toEqual('Test Description');
});
it('should apply the host class "ui-empty-state"', () => {
expect(spectator.element.classList.contains('ui-empty-state')).toBe(true);
});
});