9b8aada76edce6d4900ca8ae9397fdc0f6df30dc55d504e5a6650ccfdcf3473266e1d3c25240abdc7ca6988be4128f9ac0b41aa16418d758ee98489bd252e8 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. describe('manualColumnResize', function () {
  2. var id = 'testContainer';
  3. beforeEach(function () {
  4. this.$container = $('<div id="' + id + '"></div>').appendTo('body');
  5. });
  6. afterEach(function () {
  7. if (this.$container) {
  8. destroy();
  9. this.$container.remove();
  10. }
  11. });
  12. it('should change column widths at init', function () {
  13. handsontable({
  14. manualColumnResize: [100, 150, 180]
  15. });
  16. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(100);
  17. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(150);
  18. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(180);
  19. });
  20. it('should be enabled after specifying it in updateSettings config', function () {
  21. var hot = handsontable({
  22. data: [{ id: 1, name: 'Ted', lastName: 'Right' }, { id: 2, name: 'Frank', lastName: 'Honest' }, { id: 3, name: 'Joan', lastName: 'Well' }, { id: 4, name: 'Sid', lastName: 'Strong' }, { id: 5, name: 'Jane', lastName: 'Neat' }],
  23. colHeaders: true
  24. });
  25. updateSettings({ manualColumnResize: true });
  26. this.$container.find('thead tr:eq(0) th:eq(0)').simulate('mouseover');
  27. expect($('.manualColumnResizer').size()).toBeGreaterThan(0);
  28. });
  29. it('should change the default column widths with updateSettings', function () {
  30. handsontable({
  31. manualColumnResize: true
  32. });
  33. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(50);
  34. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(50);
  35. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(50);
  36. updateSettings({
  37. manualColumnResize: [60, 50, 80]
  38. });
  39. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(60);
  40. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(50);
  41. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(80);
  42. });
  43. it('should change column widths with updateSettings', function () {
  44. handsontable({
  45. manualColumnResize: [100, 150, 180]
  46. });
  47. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(100);
  48. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(150);
  49. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(180);
  50. updateSettings({
  51. manualColumnResize: [60, 50, 80]
  52. });
  53. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(60);
  54. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(50);
  55. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(80);
  56. });
  57. it('should reset column widths when undefined is passed', function () {
  58. handsontable({
  59. manualColumnResize: [100, 150, 180]
  60. });
  61. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(100);
  62. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(150);
  63. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(180);
  64. updateSettings({
  65. manualColumnResize: void 0
  66. });
  67. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(50);
  68. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(50);
  69. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(50);
  70. });
  71. it('should not reset column widths when `true` is passed', function () {
  72. handsontable({
  73. manualColumnResize: [100, 150, 180]
  74. });
  75. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(100);
  76. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(150);
  77. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(180);
  78. updateSettings({
  79. manualColumnResize: true
  80. });
  81. expect(this.$container.find('tbody tr:eq(0) td:eq(0)').outerWidth()).toBe(100);
  82. expect(this.$container.find('tbody tr:eq(0) td:eq(1)').outerWidth()).toBe(150);
  83. expect(this.$container.find('tbody tr:eq(0) td:eq(2)').outerWidth()).toBe(180);
  84. });
  85. it('should resize (narrowing) appropriate columns, even when stretchH `all` is enabled', function () {
  86. this.$container.css('width', '910px');
  87. handsontable({
  88. colHeaders: true,
  89. manualColumnResize: true,
  90. stretchH: 'all'
  91. });
  92. resizeColumn(1, 65);
  93. var $columnHeaders = this.$container.find('thead tr:eq(1) th');
  94. expect($columnHeaders.eq(0).width()).toBe(209);
  95. expect($columnHeaders.eq(1).width()).toBe(64);
  96. expect($columnHeaders.eq(2).width()).toBe(210);
  97. expect($columnHeaders.eq(3).width()).toBe(210);
  98. expect($columnHeaders.eq(4).width()).toBe(211);
  99. });
  100. it('should resize (extending) appropriate columns, even when stretchH `all` is enabled', function () {
  101. this.$container.css('width', '910px');
  102. handsontable({
  103. colHeaders: true,
  104. manualColumnResize: true,
  105. stretchH: 'all'
  106. });
  107. resizeColumn(1, 400);
  108. var $columnHeaders = this.$container.find('thead tr:eq(1) th');
  109. expect($columnHeaders.eq(0).width()).toBe(125);
  110. expect($columnHeaders.eq(1).width()).toBe(399);
  111. expect($columnHeaders.eq(2).width()).toBe(126);
  112. expect($columnHeaders.eq(3).width()).toBe(126);
  113. expect($columnHeaders.eq(4).width()).toBe(128);
  114. });
  115. it('should resize (narrowing) selected columns', function (done) {
  116. var hot = handsontable({
  117. data: Handsontable.helper.createSpreadsheetData(10, 20),
  118. colHeaders: true,
  119. manualColumnResize: true
  120. });
  121. var $columnHeaders = this.$container.find('thead tr:eq(0) th');
  122. var $colHeader = this.$container.find('thead tr:eq(0) th:eq(1)');
  123. $colHeader.simulate('mouseover');
  124. var $resizer = this.$container.find('.manualColumnResizer');
  125. var resizerPosition = $resizer.position();
  126. this.$container.find('tr:eq(0) th:eq(1)').simulate('mousedown');
  127. this.$container.find('tr:eq(0) th:eq(2)').simulate('mouseover');
  128. this.$container.find('tr:eq(0) th:eq(3)').simulate('mouseover');
  129. this.$container.find('tr:eq(0) th:eq(3)').simulate('mousemove');
  130. this.$container.find('tr:eq(0) th:eq(3)').simulate('mouseup');
  131. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  132. $resizer.simulate('mousemove', { clientX: this.$container.find('tr:eq(0) th:eq(1)').position().left + 29 });
  133. $resizer.simulate('mouseup');
  134. setTimeout(function () {
  135. expect($columnHeaders.eq(1).width()).toBe(33);
  136. expect($columnHeaders.eq(2).width()).toBe(34);
  137. expect($columnHeaders.eq(3).width()).toBe(34);
  138. done();
  139. }, 1000);
  140. });
  141. it('should resize (expanding) selected columns', function (done) {
  142. var hot = handsontable({
  143. data: Handsontable.helper.createSpreadsheetData(10, 20),
  144. colHeaders: true,
  145. manualColumnResize: true
  146. });
  147. var $columnHeaders = this.$container.find('thead tr:eq(0) th');
  148. var $colHeader = this.$container.find('thead tr:eq(0) th:eq(1)');
  149. $colHeader.simulate('mouseover');
  150. var $resizer = this.$container.find('.manualColumnResizer');
  151. var resizerPosition = $resizer.position();
  152. this.$container.find('tr:eq(0) th:eq(1)').simulate('mousedown');
  153. this.$container.find('tr:eq(0) th:eq(2)').simulate('mouseover');
  154. this.$container.find('tr:eq(0) th:eq(3)').simulate('mouseover');
  155. this.$container.find('tr:eq(0) th:eq(3)').simulate('mousemove');
  156. this.$container.find('tr:eq(0) th:eq(3)').simulate('mouseup');
  157. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  158. $resizer.simulate('mousemove', { clientX: this.$container.find('tr:eq(0) th:eq(1)').position().left + 150 });
  159. $resizer.simulate('mouseup');
  160. setTimeout(function () {
  161. expect($columnHeaders.eq(1).width()).toBe(154);
  162. expect($columnHeaders.eq(2).width()).toBe(155);
  163. expect($columnHeaders.eq(3).width()).toBe(155);
  164. done();
  165. }, 1000);
  166. });
  167. it('should resize appropriate columns to calculated stretch width after double click on column handler when stretchH is set as `all`', function (done) {
  168. this.$container.css('width', '910px');
  169. handsontable({
  170. colHeaders: true,
  171. manualColumnResize: true,
  172. stretchH: 'all'
  173. });
  174. resizeColumn(1, 65);
  175. var $columnHeaders = this.$container.find('thead tr:eq(1) th');
  176. expect($columnHeaders.eq(0).width()).toBe(209);
  177. expect($columnHeaders.eq(1).width()).toBe(64);
  178. expect($columnHeaders.eq(2).width()).toBe(210);
  179. expect($columnHeaders.eq(3).width()).toBe(210);
  180. expect($columnHeaders.eq(4).width()).toBe(211);
  181. var $th = $columnHeaders.eq(1);
  182. $th.simulate('mouseover');
  183. var $resizer = this.$container.find('.manualColumnResizer');
  184. var resizerPosition = $resizer.position();
  185. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  186. $resizer.simulate('mouseup');
  187. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  188. $resizer.simulate('mouseup');
  189. setTimeout(function () {
  190. expect($columnHeaders.eq(0).width()).toBe(180);
  191. expect($columnHeaders.eq(1).width()).toBe(181);
  192. expect($columnHeaders.eq(2).width()).toBe(181);
  193. expect($columnHeaders.eq(3).width()).toBe(181);
  194. expect($columnHeaders.eq(4).width()).toBe(181);
  195. done();
  196. }, 1000);
  197. });
  198. it('should resize appropriate columns to calculated autoColumnSize width after double click on column handler when stretchH is set as `last`', function (done) {
  199. this.$container.css('width', '910px');
  200. handsontable({
  201. colHeaders: true,
  202. manualColumnResize: true,
  203. stretchH: 'last'
  204. });
  205. resizeColumn(0, 65);
  206. var $columnHeaders = this.$container.find('thead tr:eq(0) th');
  207. expect($columnHeaders.eq(0).width()).toBe(63);
  208. expect($columnHeaders.eq(1).width()).toBe(48);
  209. expect($columnHeaders.eq(2).width()).toBe(49);
  210. expect($columnHeaders.eq(3).width()).toBe(49);
  211. expect($columnHeaders.eq(4).width()).toBe(694);
  212. var $th = $columnHeaders.eq(0);
  213. $th.simulate('mouseover');
  214. var $resizer = this.$container.find('.manualColumnResizer');
  215. var resizerPosition = $resizer.position();
  216. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  217. $resizer.simulate('mouseup');
  218. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  219. $resizer.simulate('mouseup');
  220. setTimeout(function () {
  221. expect($columnHeaders.eq(0).width()).toBeAroundValue(19);
  222. expect($columnHeaders.eq(1).width()).toBe(48);
  223. expect($columnHeaders.eq(2).width()).toBe(49);
  224. expect($columnHeaders.eq(3).width()).toBe(49);
  225. expect($columnHeaders.eq(4).width()).toBeAroundValue(738);
  226. done();
  227. }, 1000);
  228. });
  229. it('should resize appropriate columns, even if the column order was changed with manualColumnMove plugin', function () {
  230. handsontable({
  231. colHeaders: ['First', 'Second', 'Third'],
  232. manualColumnMove: [2, 1, 0, 3],
  233. manualColumnResize: true
  234. });
  235. var $columnHeaders = this.$container.find('thead tr:eq(0) th');
  236. var initialColumnWidths = [];
  237. $columnHeaders.each(function () {
  238. initialColumnWidths.push($(this).width());
  239. });
  240. resizeColumn.call(this, 0, 100);
  241. var $resizedTh = $columnHeaders.eq(0);
  242. expect($resizedTh.text()).toEqual('Third');
  243. expect($resizedTh.outerWidth()).toEqual(100);
  244. // Sizes of remaining columns should stay the same
  245. for (var i = 1; i < $columnHeaders.length; i++) {
  246. expect($columnHeaders.eq(i).width()).toEqual(initialColumnWidths[i]);
  247. }
  248. });
  249. it('should trigger an afterColumnResize event after column size changes', function () {
  250. var afterColumnResizeCallback = jasmine.createSpy('afterColumnResizeCallback');
  251. handsontable({
  252. data: Handsontable.helper.createSpreadsheetData(3, 3),
  253. colHeaders: true,
  254. manualColumnResize: true,
  255. afterColumnResize: afterColumnResizeCallback
  256. });
  257. expect(colWidth(this.$container, 0)).toEqual(50);
  258. resizeColumn(0, 100);
  259. expect(afterColumnResizeCallback).toHaveBeenCalledWith(0, 100, void 0, void 0, void 0, void 0);
  260. expect(colWidth(this.$container, 0)).toEqual(100);
  261. });
  262. it('should not trigger an afterColumnResize event if column size does not change (mouseMove event width delta = 0)', function () {
  263. var afterColumnResizeCallback = jasmine.createSpy('afterColumnResizeCallback');
  264. handsontable({
  265. data: Handsontable.helper.createSpreadsheetData(3, 3),
  266. colHeaders: true,
  267. manualColumnResize: true,
  268. afterColumnResize: afterColumnResizeCallback
  269. });
  270. expect(colWidth(this.$container, 0)).toEqual(50);
  271. resizeColumn(0, 50);
  272. expect(afterColumnResizeCallback).not.toHaveBeenCalled();
  273. expect(colWidth(this.$container, 0)).toEqual(50);
  274. });
  275. it('should not trigger an afterColumnResize event if column size does not change (no mouseMove event)', function () {
  276. var afterColumnResizeCallback = jasmine.createSpy('afterColumnResizeCallback');
  277. handsontable({
  278. data: Handsontable.helper.createSpreadsheetData(3, 3),
  279. colHeaders: true,
  280. manualColumnResize: true,
  281. afterColumnResize: afterColumnResizeCallback
  282. });
  283. expect(colWidth(this.$container, 0)).toEqual(50);
  284. var $th = this.$container.find('thead tr:eq(0) th:eq(0)');
  285. $th.simulate('mouseover');
  286. var $resizer = this.$container.find('.manualColumnResizer');
  287. var resizerPosition = $resizer.position();
  288. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  289. $resizer.simulate('mouseup');
  290. expect(afterColumnResizeCallback).not.toHaveBeenCalled();
  291. expect(colWidth(this.$container, 0)).toEqual(50);
  292. });
  293. it('should trigger an afterColumnResize after column size changes, after double click', function (done) {
  294. var afterColumnResizeCallback = jasmine.createSpy('afterColumnResizeCallback');
  295. handsontable({
  296. data: Handsontable.helper.createSpreadsheetData(3, 3),
  297. colHeaders: true,
  298. manualColumnResize: true,
  299. afterColumnResize: afterColumnResizeCallback
  300. });
  301. expect(colWidth(this.$container, 0)).toEqual(50);
  302. var $th = this.$container.find('thead tr:eq(0) th:eq(0)');
  303. $th.simulate('mouseover');
  304. var $resizer = this.$container.find('.manualColumnResizer');
  305. var resizerPosition = $resizer.position();
  306. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  307. $resizer.simulate('mouseup');
  308. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  309. $resizer.simulate('mouseup');
  310. setTimeout(function () {
  311. expect(afterColumnResizeCallback.calls.count()).toEqual(1);
  312. expect(afterColumnResizeCallback.calls.argsFor(0)[0]).toEqual(0);
  313. // All modern browsers returns width = 25px, but IE8 seems to compute width differently and returns 24px
  314. expect(afterColumnResizeCallback.calls.argsFor(0)[1]).toBeInArray([30, 31, 32, 24, 25]);
  315. expect(colWidth(spec().$container, 0)).toBeInArray([30, 31, 32, 24, 25]);
  316. done();
  317. }, 1000);
  318. });
  319. it('should autosize column after double click (when initial width is not defined)', function (done) {
  320. handsontable({
  321. data: Handsontable.helper.createSpreadsheetData(3, 3),
  322. colHeaders: true,
  323. manualColumnResize: true,
  324. columns: [{ width: 100 }, { width: 200 }, {}]
  325. });
  326. expect(colWidth(this.$container, 0)).toEqual(100);
  327. expect(colWidth(this.$container, 1)).toEqual(200);
  328. expect(colWidth(this.$container, 2)).toEqual(50);
  329. resizeColumn(2, 300);
  330. var $resizer = this.$container.find('.manualColumnResizer');
  331. var resizerPosition = $resizer.position();
  332. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  333. $resizer.simulate('mouseup');
  334. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  335. $resizer.simulate('mouseup');
  336. setTimeout(function () {
  337. expect(colWidth(spec().$container, 2)).toBeAroundValue(29, 3);
  338. done();
  339. }, 1000);
  340. });
  341. it('should autosize selected columns after double click on handler', function (done) {
  342. handsontable({
  343. data: Handsontable.helper.createSpreadsheetData(9, 9),
  344. colHeaders: true,
  345. manualColumnResize: true
  346. });
  347. resizeColumn(2, 300);
  348. this.$container.find('thead tr:eq(0) th:eq(1)').simulate('mousedown');
  349. this.$container.find('thead tr:eq(0) th:eq(2)').simulate('mouseover');
  350. this.$container.find('thead tr:eq(0) th:eq(3)').simulate('mouseover');
  351. this.$container.find('thead tr:eq(0) th:eq(3)').simulate('mousemove');
  352. this.$container.find('thead tr:eq(0) th:eq(3)').simulate('mouseup');
  353. var $resizer = spec().$container.find('.manualColumnResizer');
  354. var resizerPosition = $resizer.position();
  355. setTimeout(function () {
  356. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  357. $resizer.simulate('mouseup');
  358. $resizer.simulate('mousedown', { clientX: resizerPosition.left });
  359. $resizer.simulate('mouseup');
  360. }, 600);
  361. setTimeout(function () {
  362. expect(colWidth(spec().$container, 1)).toBeAroundValue(32, 2);
  363. expect(colWidth(spec().$container, 2)).toBeAroundValue(32, 2);
  364. expect(colWidth(spec().$container, 3)).toBeAroundValue(32, 2);
  365. done();
  366. }, 1200);
  367. });
  368. it('should adjust resize handles position after table size changed', function () {
  369. var maxed = false;
  370. handsontable({
  371. colHeaders: true,
  372. manualColumnResize: true,
  373. stretchH: 'all',
  374. width: function width() {
  375. return maxed ? 614 : 200;
  376. }
  377. });
  378. this.$container.find('thead th:eq(0)').simulate('mouseover');
  379. var handle = this.$container.find('.manualColumnResizer');
  380. var handleBox = handle[0].getBoundingClientRect();
  381. var th0 = this.$container.find('thead th:eq(0)');
  382. var thBox = th0[0].getBoundingClientRect();
  383. expect(handleBox.left + handleBox.width).toEqual(thBox.left + thBox.width - 1);
  384. maxed = true;
  385. render();
  386. this.$container.find('thead th:eq(0)').simulate('mouseover');
  387. handleBox = handle[0].getBoundingClientRect();
  388. thBox = th0[0].getBoundingClientRect();
  389. expect(handleBox.left + handleBox.width).toEqual(thBox.left + thBox.width - 1);
  390. });
  391. it('should display the resize handle in the correct place after the table has been scrolled', function () {
  392. var hot = handsontable({
  393. data: Handsontable.helper.createSpreadsheetData(10, 20),
  394. colHeaders: true,
  395. manualColumnResize: true,
  396. height: 100,
  397. width: 200
  398. });
  399. var mainHolder = hot.view.wt.wtTable.holder;
  400. var $colHeader = this.$container.find('.ht_clone_top thead tr:eq(0) th:eq(2)');
  401. $colHeader.simulate('mouseover');
  402. var $handle = this.$container.find('.manualColumnResizer');
  403. $handle[0].style.background = 'red';
  404. expect($colHeader.offset().left + $colHeader.width() - 5).toBeCloseTo($handle.offset().left, 0);
  405. expect($colHeader.offset().top).toBeCloseTo($handle.offset().top, 0);
  406. $(mainHolder).scrollLeft(200);
  407. hot.render();
  408. $colHeader = this.$container.find('.ht_clone_top thead tr:eq(0) th:eq(3)');
  409. $colHeader.simulate('mouseover');
  410. expect($colHeader.offset().left + $colHeader.width() - 5).toBeCloseTo($handle.offset().left, 0);
  411. expect($colHeader.offset().top).toBeCloseTo($handle.offset().top, 0);
  412. });
  413. describe('handle and guide', function () {
  414. it('should display the resize handle in the proper position and with a proper size', function () {
  415. var hot = handsontable({
  416. data: [{ id: 1, name: 'Ted', lastName: 'Right' }, { id: 2, name: 'Frank', lastName: 'Honest' }, { id: 3, name: 'Joan', lastName: 'Well' }, { id: 4, name: 'Sid', lastName: 'Strong' }, { id: 5, name: 'Jane', lastName: 'Neat' }],
  417. colHeaders: true,
  418. manualColumnResize: true
  419. });
  420. var $headerTH = this.$container.find('thead tr:eq(0) th:eq(1)');
  421. $headerTH.simulate('mouseover');
  422. var $handle = $('.manualColumnResizer');
  423. expect($handle.offset().left).toEqual($headerTH.offset().left + $headerTH.outerWidth() - $handle.outerWidth() - 1);
  424. expect($handle.height()).toEqual($headerTH.outerHeight());
  425. });
  426. });
  427. });