File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,19 @@ describe('gridstack', function() {
247247 grid . column ( 12 ) ;
248248 expect ( grid . getColumn ( ) ) . toBe ( 12 ) ;
249249 } ) ;
250+ it ( 'should set construct CSS class' , function ( ) {
251+ let grid = GridStack . init ( { column : 1 } ) ;
252+ expect ( grid . el . classList . contains ( 'grid-stack-1' ) ) . toBe ( true ) ;
253+ grid . column ( 2 ) ;
254+ expect ( grid . el . classList . contains ( 'grid-stack-1' ) ) . toBe ( false ) ;
255+ expect ( grid . el . classList . contains ( 'grid-stack-2' ) ) . toBe ( true ) ;
256+ } ) ;
257+ it ( 'should set CSS class' , function ( ) {
258+ let grid = GridStack . init ( ) ;
259+ expect ( grid . el . classList . contains ( 'grid-stack' ) ) . toBe ( true ) ;
260+ grid . column ( 1 ) ;
261+ expect ( grid . el . classList . contains ( 'grid-stack-1' ) ) . toBe ( true ) ;
262+ } ) ;
250263 it ( 'should SMALL change column number, no relayout' , function ( ) {
251264 let options = {
252265 column : 12
You can’t perform that action at this time.
0 commit comments