DataGrid - Keyboard navigation - e2e tests: Fix unstable tests. And remove CardView.filterSync tests#32679
DataGrid - Keyboard navigation - e2e tests: Fix unstable tests. And remove CardView.filterSync tests#32679Alyar666 wants to merge 2 commits intoDevExpress:26_1from
Conversation
There was a problem hiding this comment.
Pull request overview
Updates DevExtreme e2e coverage to reduce DataGrid keyboard-navigation test instability and removes obsolete CardView FilterSync API tests (feature disabled).
Changes:
- Reworks DataGrid keyboard navigation e2e scenarios (adds new focus/navigation regressions and restructures quick-navigation tests to run for both
scrolling.useNativemodes). - Adds dedicated e2e coverage for Tab / Shift+Tab behavior through interactive elements inside
editCellTemplatein row/batch edit modes (T1299278). - Removes the skipped CardView FilterSync API test suite.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts | Adds/adjusts keyboard navigation cases and parameterizes End/Ctrl+End focus-event scenarios for useNative true/false to reduce flakiness. |
| e2e/testcafe-devextreme/tests/cardView/filterSync/api.functional.ts | Removes the (previously skipped) FilterSync API tests for CardView since the feature is disabled. |
Comments suppressed due to low confidence (2)
e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts:6228
- The 1000ms hard wait after Ctrl+End adds noticeable runtime (and this block runs twice for useNative=true/false) and may still be insufficient under load. Consider replacing it with a condition-based wait (e.g., wait until the expected cell becomes focused) so the test is both faster and more stable.
// act
await t.pressKey('ctrl+end');
await t.wait(1000);
e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts:5392
- The fixed delay used to “wait for the focus to be set” can still be timing-sensitive across environments and adds unnecessary runtime. Prefer waiting on an observable condition (e.g., expect the clicked cell to become focused with a timeout) instead of t.wait(100).
// act
await t.click(dataGrid.getDataCell(0, 0).element);
await t.wait(100); // wait for the focus to be set in the grid
752d059 to
7a001a2
Compare
7a001a2 to
af91898
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts:5386
- Inside the
[true, false].forEach((useNativeScrolling) => { ... })block, the section header comments and thetest(...)calls are indented differently than other statements in the same block (e.g., the// # Quick navigation...lines are not indented at all). Please align indentation for the block so nested statements/comments are consistently indented, to avoid style/lint issues and keep the test section readable.
[true, false].forEach((useNativeScrolling) => {
// # Quick navigation through grid cells
// ## End key
test(`Focus events should be called when pressing the End key (scrolling.useNative = ${useNativeScrolling})`, async (t) => {
| await t.wait(1000); | ||
|
|
||
| // assert | ||
| await t | ||
| .expect(dataGrid.getDataCell(199, 34).element.focused) | ||
| .ok() |
There was a problem hiding this comment.
This test relies on a fixed t.wait(1000) after sending ctrl+end. Fixed sleeps are a common source of e2e flakiness (too short on slow CI) and add unnecessary runtime (too long on fast runs). Prefer waiting on an explicit condition with a timeout (e.g., focused cell/row or expected event call order) instead of a hard-coded delay.
| await t.wait(1000); | |
| // assert | |
| await t | |
| .expect(dataGrid.getDataCell(199, 34).element.focused) | |
| .ok() | |
| // assert | |
| await t | |
| .expect(dataGrid.getDataCell(199, 34).element.focused) | |
| .ok({ timeout: 5000 }) |
No description provided.