DataGrid - Fix the "No data" text not being shown when a lookup column is filtered (T1293839)#32757
DataGrid - Fix the "No data" text not being shown when a lookup column is filtered (T1293839)#32757markallenramirez wants to merge 14 commits intoDevExpress:26_1from
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an E2E regression test to ensure DataGrid renders the “No data” text after filtering a lookup column, covering the scenario described in the PR title.
Changes:
- Import
ListTestCafe model to interact with the lookup dropdown. - Add a new screenshot-based TestCafe test reproducing “lookup filter + text filter => no data” state.
e2e/testcafe-devextreme/tests/dataGrid/common/markup/noDataText.ts
Outdated
Show resolved
Hide resolved
| const dataGrid = new DataGrid(GRID_CONTAINER); | ||
| const filterRow = dataGrid.getHeaders().getFilterRow(); | ||
| const nameFilterCell = filterRow.getFilterCell(0); | ||
| const nameFilterEditor = nameFilterCell.getEditorInput(); | ||
| const lookupFilterCell = filterRow.getFilterCell(1); | ||
|
|
||
| // act | ||
| await t.click(lookupFilterCell.element); | ||
| const lookupList = new List(OVERLAY_SELECTOR); |
There was a problem hiding this comment.
The test interacts with the filter row immediately after creating the widget, but doesn’t assert the grid is ready first. Please add an await t.expect(dataGrid.isReady()).ok(); (or equivalent) before clicking/typing to avoid timing-related failures on slower CI runs.
There was a problem hiding this comment.
However, it is recommended to add this check since data is always loaded asynchronously (by default, within 30ms). Failure to do so may result in flickering tests.
e2e/testcafe-devextreme/tests/dataGrid/common/markup/noDataText.ts
Outdated
Show resolved
Hide resolved
7696eba to
e66ecca
Compare
packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts
Outdated
Show resolved
Hide resolved
This reverts commit e66ecca.
| const dataGrid = new DataGrid(GRID_CONTAINER); | ||
| const filterRow = dataGrid.getHeaders().getFilterRow(); | ||
| const nameFilterCell = filterRow.getFilterCell(0); | ||
| const nameFilterEditor = nameFilterCell.getEditorInput(); | ||
| const lookupFilterCell = filterRow.getFilterCell(1); | ||
|
|
||
| // act | ||
| await t.click(lookupFilterCell.element); | ||
| const lookupList = new List(OVERLAY_SELECTOR); |
There was a problem hiding this comment.
However, it is recommended to add this check since data is always loaded asynchronously (by default, within 30ms). Failure to do so may result in flickering tests.
|
|
||
| // act | ||
| await t.click(lookupFilterCell.element); | ||
| const lookupList = new List(OVERLAY_SELECTOR); |
There was a problem hiding this comment.
Minor comment: I suggest creating a getLookup/getSelectBox method at the FilterCell model level, which will return the SelectBox model. This model has the necessary API for testing.
No description provided.