mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
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
30 lines
923 B
TypeScript
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);
|
|
});
|
|
});
|