@@ -82,10 +82,32 @@ describe('Example: todo', () => {
8282 expectValidStack ( config , 'todo' ) ;
8383 } ) ;
8484
85- it ( 'dashboards should have type, name, label, description' , ( ) => {
85+ it ( 'should have explicit views' , ( ) => {
86+ expect ( Array . isArray ( config . views ) ) . toBe ( true ) ;
87+ expect ( config . views . length ) . toBeGreaterThan ( 0 ) ;
88+ } ) ;
89+
90+ it ( 'objects should have name, label, and fields' , ( ) => {
91+ for ( const obj of config . objects ) {
92+ expect ( obj ) . toHaveProperty ( 'name' ) ;
93+ expect ( obj ) . toHaveProperty ( 'label' ) ;
94+ expect ( obj ) . toHaveProperty ( 'fields' ) ;
95+ }
96+ } ) ;
97+
98+ it ( 'dashboards should have name, label, description, and valid widgets' , ( ) => {
8699 assertDashboards ( config . dashboards , 'todo' ) ;
87100 } ) ;
88101
102+ it ( 'pages should have name, label, type, and regions' , ( ) => {
103+ for ( const page of config . pages ?? [ ] ) {
104+ expect ( page ) . toHaveProperty ( 'name' ) ;
105+ expect ( page ) . toHaveProperty ( 'label' ) ;
106+ expect ( page ) . toHaveProperty ( 'type' ) ;
107+ expect ( page ) . toHaveProperty ( 'regions' ) ;
108+ }
109+ } ) ;
110+
89111 it ( 'manifest should have required fields' , ( ) => {
90112 assertManifest ( config . manifest ) ;
91113 } ) ;
@@ -112,15 +134,32 @@ describe('Example: kitchen-sink', () => {
112134 expectValidStack ( config , 'kitchen-sink' ) ;
113135 } ) ;
114136
115- it ( 'dashboards should have type, name, label, description' , ( ) => {
116- assertDashboards ( config . dashboards , 'kitchen-sink' ) ;
137+ it ( 'objects should have name, label, and fields' , ( ) => {
138+ for ( const obj of config . objects ) {
139+ expect ( obj ) . toHaveProperty ( 'name' ) ;
140+ expect ( obj ) . toHaveProperty ( 'label' ) ;
141+ expect ( obj ) . toHaveProperty ( 'fields' ) ;
142+ }
117143 } ) ;
118144
119145 it ( 'should have explicit views' , ( ) => {
120146 expect ( Array . isArray ( config . views ) ) . toBe ( true ) ;
121147 expect ( config . views . length ) . toBeGreaterThan ( 0 ) ;
122148 } ) ;
123149
150+ it ( 'dashboards should have name, label, description, and valid widgets' , ( ) => {
151+ assertDashboards ( config . dashboards , 'kitchen-sink' ) ;
152+ } ) ;
153+
154+ it ( 'pages should have name, label, type, and regions' , ( ) => {
155+ for ( const page of config . pages ?? [ ] ) {
156+ expect ( page ) . toHaveProperty ( 'name' ) ;
157+ expect ( page ) . toHaveProperty ( 'label' ) ;
158+ expect ( page ) . toHaveProperty ( 'type' ) ;
159+ expect ( page ) . toHaveProperty ( 'regions' ) ;
160+ }
161+ } ) ;
162+
124163 it ( 'manifest should have required fields' , ( ) => {
125164 assertManifest ( config . manifest ) ;
126165 } ) ;
@@ -145,10 +184,32 @@ describe('Example: crm', () => {
145184 expectValidStack ( config , 'crm' ) ;
146185 } ) ;
147186
148- it ( 'dashboards should have type, name, label, description' , ( ) => {
187+ it ( 'objects should have name, label, and fields' , ( ) => {
188+ for ( const obj of config . objects ) {
189+ expect ( obj ) . toHaveProperty ( 'name' ) ;
190+ expect ( obj ) . toHaveProperty ( 'label' ) ;
191+ expect ( obj ) . toHaveProperty ( 'fields' ) ;
192+ }
193+ } ) ;
194+
195+ it ( 'should have explicit views' , ( ) => {
196+ expect ( Array . isArray ( config . views ) ) . toBe ( true ) ;
197+ expect ( config . views . length ) . toBeGreaterThan ( 0 ) ;
198+ } ) ;
199+
200+ it ( 'dashboards should have name, label, description, and valid widgets' , ( ) => {
149201 assertDashboards ( config . dashboards , 'crm' ) ;
150202 } ) ;
151203
204+ it ( 'pages should have name, label, type, and regions' , ( ) => {
205+ for ( const page of config . pages ?? [ ] ) {
206+ expect ( page ) . toHaveProperty ( 'name' ) ;
207+ expect ( page ) . toHaveProperty ( 'label' ) ;
208+ expect ( page ) . toHaveProperty ( 'type' ) ;
209+ expect ( page ) . toHaveProperty ( 'regions' ) ;
210+ }
211+ } ) ;
212+
152213 it ( 'manifest should have required fields' , ( ) => {
153214 assertManifest ( config . manifest ) ;
154215 } ) ;
0 commit comments