DataGrid - Use Fluent theme in QUnit (dataGrid.markup, dataGrid.resizing, dataGrid.tests, filterRow) - #34541
DataGrid - Use Fluent theme in QUnit (dataGrid.markup, dataGrid.resizing, dataGrid.tests, filterRow)#34541Tucchhaa wants to merge 2 commits into
Conversation
| scrolling: { | ||
| useNative: false | ||
| } |
There was a problem hiding this comment.
changes of scrolling.useNative was added to make tests run successfully on MacOS. On MacOS useNative is set by default to true and when scrollbar is shown, it affected the column widths
| // assert | ||
| const $commandColumnCells = $($(dataGrid.$element()).find('.dx-command-expand')); | ||
| assert.equal($commandColumnCells.eq(0).width(), 15, 'expand command column width'); | ||
| assert.equal($commandColumnCells.eq(0).outerWidth(), 15, 'expand command column width'); |
There was a problem hiding this comment.
use outer to width to include padding width
| @@ -4,12 +4,11 @@ export const DX_ICON_EXPORT_SELECTED_CONTENT_CODE = 61549; // .dx-font-icon("\f0 | |||
| export const DX_ICON_XLSX_FILE_CONTENT_CODE = 61719; // .dx-font-icon("\f117") | |||
|
|
|||
| export function checkDxFontIcon(assert, dxIconSelector, expectedIconCode) { | |||
There was a problem hiding this comment.
This helper func is used only in 2 files: dataGrid.tests, and pivotGrid/export.tests
|
|
||
| // assert | ||
| assert.equal($('#dataGrid').find('.dx-datagrid').height(), 298); | ||
| assert.roughEqual($('#dataGrid').find('.dx-datagrid').height(), 1, 298); |
There was a problem hiding this comment.
shouldn't this be roughEqual(..., 298, 1)? looks like the expected and epsilon arguments got reversed - roughEqual(actual, expected, epsilon) - so right now it checks height against 1 with a 298 tolerance
There was a problem hiding this comment.
Nice catch, thank you
|
|
||
| // assert | ||
| assert.equal(dataGrid.getVisibleColumns()[0].visibleWidth, 70); | ||
| assert.roughEqual(dataGrid.getVisibleColumns()[0].visibleWidth, 0.001, 50); |
There was a problem hiding this comment.
same reversed arguments here - shouldn't it be roughEqual(..., 50, 0.001)? as written the expected is 0.001 and the tolerance is 50
No description provided.