Skip to content

Commit 3fada5a

Browse files
authored
Merge pull request #1574 from adumesny/develop
column-N class fix test
2 parents b834b3a + f63d240 commit 3fada5a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/gridstack-spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)