@@ -3,6 +3,7 @@ import { Provider } from 'react-redux';
3
3
import '@testing-library/jest-dom' ;
4
4
import { render , screen , fireEvent , waitFor } from '@testing-library/react' ;
5
5
import BottomTabs from '../app/src/components/bottom/BottomTabs' ;
6
+ import ContextManager from '../app/src/components/ContextAPIManager/ContextManager' ;
6
7
import store from '../app/src/redux/store' ;
7
8
import ComponentPanel from '../app/src/components/right/ComponentPanel' ;
8
9
import HTMLPanel from '../app/src/components/left/HTMLPanel' ;
@@ -25,8 +26,8 @@ describe('Bottom Panel Render Test', () => {
25
26
} ) ;
26
27
} ) ;
27
28
28
- describe ( 'invalid input test ' , ( ) => {
29
- test ( 'New Component should display correct warning on empty input ' , async ( ) => {
29
+ describe ( 'Creation Panel ' , ( ) => {
30
+ test ( 'should invalidate empty field in New Component name ' , async ( ) => {
30
31
render (
31
32
< Provider store = { store } >
32
33
< ComponentPanel isThemeLight = { null } />
@@ -42,7 +43,7 @@ describe('invalid input test', () => {
42
43
} ) ;
43
44
} ) ;
44
45
45
- test ( 'New Component should display correct warning when input contains symbols' , async ( ) => {
46
+ test ( 'should invalidate New Component name containing symbols' , async ( ) => {
46
47
render (
47
48
< Provider store = { store } >
48
49
< ComponentPanel isThemeLight = { null } />
@@ -64,7 +65,7 @@ describe('invalid input test', () => {
64
65
} ) ;
65
66
} ) ;
66
67
67
- test ( 'html tag should display error if input is empty ' , async ( ) => {
68
+ test ( 'should invalidate empty field in HTML Tag tag ' , async ( ) => {
68
69
render (
69
70
< Provider store = { store } >
70
71
< HTMLPanel isThemeLight = { null } />
@@ -78,7 +79,7 @@ describe('invalid input test', () => {
78
79
} ) ;
79
80
} ) ;
80
81
81
- test ( 'element name should display error if input starts with symbol ' , async ( ) => {
82
+ test ( 'should invalidate HTML Element name containing symbols ' , async ( ) => {
82
83
render (
83
84
< Provider store = { store } >
84
85
< HTMLPanel isThemeLight = { null } />
@@ -106,3 +107,15 @@ describe('invalid input test', () => {
106
107
} ) ;
107
108
} ) ;
108
109
} ) ;
110
+
111
+ describe ( 'Context Manager' , ( ) => {
112
+ test ( 'should contain all buttons and input fields' , ( ) => {
113
+ render (
114
+ < Provider store = { store } >
115
+ < ContextManager />
116
+ </ Provider >
117
+ ) ;
118
+ expect ( screen . getAllByRole ( 'textbox' ) ) . toHaveLength ( 2 ) ;
119
+ expect ( screen . getAllByRole ( 'button' ) ) . toHaveLength ( 3 ) ;
120
+ } ) ;
121
+ } ) ;
0 commit comments