b7dc206bc0418ee3e7323eaab154a524b7053f8c073c385954e363c9814b100864f5047177403dd91205c2035578707c1c929c451e422230bbc7a9461463f6 630 B

123456789101112131415161718192021222324252627
  1. describe('Core.toPhysicalRow', () => {
  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 return valid physical row index', () => {
  13. var hot = handsontable({
  14. data: Handsontable.helper.createSpreadsheetData(10, 10),
  15. modifyRow(row) {
  16. return row + 3;
  17. }
  18. });
  19. expect(hot.toPhysicalRow(0)).toBe(3);
  20. expect(hot.toPhysicalRow(1)).toBe(4);
  21. expect(hot.toPhysicalRow(2)).toBe(5);
  22. });
  23. });