-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnew-components.test.ts
More file actions
71 lines (61 loc) · 2.34 KB
/
new-components.test.ts
File metadata and controls
71 lines (61 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { describe, it, expect, beforeAll } from 'vitest';
import { ComponentRegistry } from '@object-ui/core';
describe('New Components Registration', () => {
// Import all renderers to register them
beforeAll(async () => {
await import('./renderers');
});
describe('Form Components', () => {
it('should register date-picker component', () => {
const component = ComponentRegistry.getConfig('date-picker');
expect(component).toBeDefined();
expect(component?.label).toBe('Date Picker');
});
it('should register file-upload component', () => {
const component = ComponentRegistry.getConfig('file-upload');
expect(component).toBeDefined();
expect(component?.label).toBe('File Upload');
});
});
describe('Data Display Components', () => {
it('should register list component', () => {
const component = ComponentRegistry.getConfig('list');
expect(component).toBeDefined();
expect(component?.label).toBe('List');
});
it('should register tree-view component', () => {
const component = ComponentRegistry.getConfig('tree-view');
expect(component).toBeDefined();
expect(component?.label).toBe('Tree View');
});
it('should register markdown component', () => {
const component = ComponentRegistry.getConfig('markdown');
expect(component).toBeDefined();
expect(component?.label).toBe('Markdown');
});
});
describe('Layout Components', () => {
it('should register grid component', () => {
const component = ComponentRegistry.getConfig('grid');
expect(component).toBeDefined();
expect(component?.label).toBe('Grid Layout');
});
it('should register flex component', () => {
const component = ComponentRegistry.getConfig('flex');
expect(component).toBeDefined();
expect(component?.label).toBe('Flex Layout');
});
it('should register container component', () => {
const component = ComponentRegistry.getConfig('container');
expect(component).toBeDefined();
expect(component?.label).toBe('Container');
});
});
describe('Feedback Components', () => {
it('should register loading component', () => {
const component = ComponentRegistry.getConfig('loading');
expect(component).toBeDefined();
expect(component?.label).toBe('Loading');
});
});
});