3d61ec935c146908269cf3d71307c8644c2d4fd6d8d8006fe6baa1f884ad5a34ab37cd991a1082c08142f77d24b709caa4cecadd46b0fdd65e127012a62dd6 20 KB

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