Sha256: 96c840e1bf988e0193d276d642c98132c8bcc3e9d3b5cf285fe8ae15f637ec9c
Contents?: true
Size: 1.5 KB
Versions: 1
Compression:
Stored size: 1.5 KB
Contents
describe('Directive: bstContainerScroll', function() { var scope, compile, windowElement, tableElement; beforeEach(module('Bastion.components')); beforeEach(inject(function(_$compile_, _$rootScope_, $window) { compile = _$compile_; scope = _$rootScope_; windowElement = angular.element($window) })); beforeEach(function() { tableElement = angular.element( '<div bst-container-scroll>' + '<table>' + '<thead>' + '<tr><th>Column 1</th></tr>' + '</thead>' + '<tbody>' + '<tr>' + '<td>Row 1</td>' + '</tr>' + '</tbody>' + '</table>' + '</div>'); compile(tableElement)(scope); scope.$digest(); }); it("should adjust the table height on window resize", function() { windowElement.height('100px'); windowElement.trigger('resize'); expect(tableElement.height()).toEqual(windowElement.height() - tableElement.offset().top); }); it("should add the nutupane details padding if it exists", function () { tableElement.css('padding-bottom', '10px'); compile(tableElement)(scope); scope.$digest(); windowElement.height('100px'); windowElement.trigger('resize'); expect(tableElement.height()).toEqual(windowElement.height() - (tableElement.offset().top + 10)); }); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bastion-3.2.1 | test/components/bst-container-scroll.directive.test.js |