@@ -92,6 +92,7 @@ describe('Conformance', () => {
9292
9393 hasSpreadProps . should . equal ( true ) ;
9494 } ) ;
95+
9596 describe ( 'className' , ( ) => {
9697 it ( `has props.className after "${ sdClass } "` , ( ) => {
9798 const renderedClasses = render ( < SDComponent className = { classes } /> )
@@ -121,21 +122,20 @@ describe('Conformance', () => {
121122 it ( `has "${ sdClass } " as the first class` , ( ) => {
122123 render ( < SDComponent /> )
123124 . findClass ( sdClass )
124- . props . className . indexOf ( sdClass ) . should . equal ( 0 ) ;
125+ . getAttribute ( 'class' )
126+ . indexOf ( sdClass ) . should . equal ( 0 ) ;
125127 } ) ;
126-
127- // test ui class guidelines, if present
128- const uiComponent = render ( < SDComponent className = { classes } /> ) ;
129- const hasUIClass = uiComponent . scryClass ( 'ui' ) . length ;
130- if ( hasUIClass ) {
131- it ( `has "ui" class immediately after "${ sdClass } "` , ( ) => {
132- uiComponent . findClass ( `${ sdClass } ui` ) ;
133- } ) ;
134- it ( 'has props.className immediately after "ui" ' , ( ) => {
135- uiComponent . findClass ( `ui ${ classes } ` ) ;
136- } ) ;
137- }
138128 }
129+
130+ // TODO: this is only true for "module" type components
131+ // Update this test once we get component meta data
132+ it ( 'does not spread the settings prop' , ( ) => {
133+ const props = { settings : { } } ;
134+ render ( < SDComponent { ...props } /> )
135+ . children ( )
136+ . some ( element => _ . has ( element . props , 'settings' ) )
137+ . should . equal ( false ) ;
138+ } ) ;
139139 } ) ;
140140 } ) ;
141141 } ) ;
0 commit comments