Core_reCreate.spec.js 669 B

1234567891011121314151617181920212223242526272829
  1. describe('Core_reCreate', () => {
  2. const 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 correctly re-render corner header when there is multiline content', () => {
  13. const settings = {
  14. rowHeaders: true,
  15. colHeaders(col) {
  16. return `Column<br>${col}`;
  17. }
  18. };
  19. handsontable(settings);
  20. destroy();
  21. handsontable(settings);
  22. expect(getTopLeftClone().width()).toBe(54);
  23. expect(getTopLeftClone().height()).toBe(45);
  24. });
  25. });