From bc8b081570b92e59d3f1f152c94b8506ab7ada32 Mon Sep 17 00:00:00 2001 From: Piotr Laszczkowski Date: Tue, 20 Oct 2020 14:04:17 +0200 Subject: [PATCH] #7171 - Adds missing test for #4303 --- .../columnSorting/test/columnSorting.e2e.js | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/plugins/columnSorting/test/columnSorting.e2e.js b/src/plugins/columnSorting/test/columnSorting.e2e.js index 7118e0dc75e..51eea374b5c 100644 --- a/src/plugins/columnSorting/test/columnSorting.e2e.js +++ b/src/plugins/columnSorting/test/columnSorting.e2e.js @@ -2684,4 +2684,29 @@ describe('ColumnSorting', () => { expect(onErrorSpy).not.toHaveBeenCalled(); }); }); + + describe('compatibility with options', () => { + it('should not break virtual rendering if preventOverflow is used', async() => { + spec().$container.css({ + height: 'auto', + width: 'auto', + overflow: 'visible' + }); + + handsontable({ + data: Handsontable.helper.createSpreadsheetData(100, 1), + columnSorting: true, + preventOverflow: 'horizontal', + }); + + $(window).scrollTop(3000); + + await sleep(500); + + const wtSpreader = spec().$container.find('.ht_master .wtSpreader'); + const cssTop = parseInt(wtSpreader.css('top'), 10); + + expect(cssTop).toBeGreaterThan(0); + }); + }) });