@@ -100,11 +100,11 @@ describe('CRM Metadata Spec Compliance', () => {
100100 }
101101 } ) ;
102102
103- it ( 'form section columns are numbers, not strings ' , ( ) => {
103+ it ( 'form section columns are valid string enum values ' , ( ) => {
104104 for ( const view of allViews ) {
105105 for ( const section of view . form . sections ) {
106106 if ( section . columns !== undefined ) {
107- expect ( typeof section . columns ) . toBe ( 'number' ) ;
107+ expect ( [ '1' , '2' , '3' , '4' ] ) . toContain ( section . columns ) ;
108108 }
109109 }
110110 }
@@ -133,18 +133,17 @@ describe('CRM Metadata Spec Compliance', () => {
133133 }
134134 } ) ;
135135
136- it ( 'no action uses variant: "danger" (must use "destructive") ' , ( ) => {
136+ it ( 'action variants use @objectstack/spec allowed values ' , ( ) => {
137137 for ( const action of allActions ) {
138138 if ( 'variant' in action ) {
139- expect ( action . variant ) . not . toBe ( 'danger' ) ;
140- expect ( [ 'default' , 'primary' , 'secondary' , 'destructive' , 'outline' , 'ghost' ] ) . toContain ( action . variant ) ;
139+ expect ( [ 'primary' , 'secondary' , 'danger' , 'ghost' , 'link' ] ) . toContain ( action . variant ) ;
141140 }
142141 }
143142 } ) ;
144143
145- it ( 'destructive actions have confirmText' , ( ) => {
144+ it ( 'danger actions have confirmText' , ( ) => {
146145 for ( const action of allActions ) {
147- if ( 'variant' in action && action . variant === 'destructive ' ) {
146+ if ( 'variant' in action && action . variant === 'danger ' ) {
148147 expect ( action ) . toHaveProperty ( 'confirmText' ) ;
149148 }
150149 }
0 commit comments