c6b7d40078d2bb159a1e86e1d999784d44dc74f7f6b50deb315c92815bfe4c6b19fd30f20a564824305ad4db44c36223324bff9a98781b724e38ed3f087e99 20 KB

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