DataGrid: stabilaze testcafe tests suit#34138
Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on reducing flakiness in the TestCafe E2E suite (primarily DataGrid and CardView) by replacing timing-sensitive steps (fixed waits, reloads, and implicit UI readiness assumptions) with explicit state assertions and more deterministic flows.
Changes:
- Added explicit readiness/tooltip assertions around visual and validation checks to reduce race conditions.
- Reworked several drag-and-drop and event-collection checks to wait on concrete UI states instead of using fixed delays.
- Marked a small set of known-flaky tests as
unstableand adjusted the runner’s failed-tests retry attempts.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| e2e/testcafe-devextreme/tests/dataGrid/common/validation/validationPopup.ts | Adds pre-screenshot assertions for validation tooltips to reduce screenshot timing flakiness. |
| e2e/testcafe-devextreme/tests/dataGrid/common/stateStoring/stateStoring.ts | Uses navigateTo(...) instead of location.reload() to reset state more reliably under the fixture configuration. |
| e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts | Switches to reading callback results via ClientFunction for a more deterministic assertion flow. |
| e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusedRow/markup.ts | Marks a visual test as unstable and adds a dataGrid.isReady() assertion before screenshot. |
| e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusedRow/focusedRow.ts | Marks a flaky test as unstable and simplifies a jQuery cast in a master-detail template. |
| e2e/testcafe-devextreme/tests/dataGrid/common/filtering/functional.ts | Moves console log capture to the point after the action and makes the error array check resilient. |
| e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts | Marks a flaky editing/navigation test as unstable. |
| e2e/testcafe-devextreme/tests/cardView/helpers/cardUtils.ts | Adds a bounded wait for expected caption count before reading captions. |
| e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts | Replaces fixed wait with UI-state assertions after drag-and-drop; tightens column expectations. |
| e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts | Uses the shared drag helper and adds a timeouted assertion for header update. |
| e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts | Adds local drag helpers and a consistent “drag end” wait to stabilize DnD interactions. |
| e2e/testcafe-devextreme/tests/accessibility/dataGrid/fixedColumns.ts | Uses direct cell click + focus assertion to reduce keyboard-navigation timing dependence. |
| e2e/testcafe-devextreme/runner.ts | Sets failed-tests retry attempts to 0. |
79737dd to
df68f96
Compare
df68f96 to
02a3c92
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
e2e/testcafe-devextreme/tests/dataGrid/common/stateStoring/stateStoring.ts:145
- This test creates the widget in the
.beforehook, but then immediately navigates tocontainer.htmland recreates the widget again inside the test body. The firstcreateWidgetis redundant and makes the test do extra work underfixture.disablePageReloads, which can slow the suite and introduce extra side effects.
test('DataGrid - Cannot read properties of undefined (reading \'done\') error occurs when column fixing and state storing are used (T1283168)', async (t) => {
await t.navigateTo(url(__dirname, '../../../container.html'));
await createWidget('dxDataGrid', { ...dataGridConfig });
// eslint-disable-next-line @stylistic/max-len
// DataGrid is expected to load normally with the given configuration, so no other checks are required.
}).before(async () => {
await createWidget('dxDataGrid', { ...dataGridConfig });
});
1461f9f to
08f2965
Compare
08f2965 to
5234892
Compare
5234892 to
077d965
Compare
077d965 to
ec1335d
Compare
ec1335d to
80caa6a
Compare
0456988 to
80caa6a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
e2e/testcafe-devextreme/tests/dataGrid/common/stateStoring/stateStoring.ts:145
- This test now navigates to
container.htmland recreates the widget in the test body, but it also recreates the same widget again in the.before()hook. The initialization in.before()becomes redundant (and can introduce extra work/flakiness) because the test immediately navigates away from that page.
Consider moving the navigation to the hook and creating the widget only once.
test('DataGrid - Cannot read properties of undefined (reading \'done\') error occurs when column fixing and state storing are used (T1283168)', async (t) => {
await t.navigateTo(url(__dirname, '../../../container.html'));
await createWidget('dxDataGrid', { ...dataGridConfig });
// eslint-disable-next-line @stylistic/max-len
// DataGrid is expected to load normally with the given configuration, so no other checks are required.
}).before(async () => {
await createWidget('dxDataGrid', { ...dataGridConfig });
});
b9e44a0 to
a359df8
Compare
a359df8 to
700c7e0
Compare
| const consoleMessages = await t.getBrowserConsoleMessages(); | ||
|
|
||
| await t | ||
| .expect(consoleMessages.error.every((msg) => !msg.includes('E1047'))) | ||
| .expect((consoleMessages?.error ?? []).every((msg) => !msg.includes('E1047'))) | ||
| .ok(); |
| await t | ||
| .expect(column.exists) | ||
| .ok({ timeout: DRAG_ASSERTION_TIMEOUT }) | ||
| .expect(column.innerText) | ||
| .eql(adjustedExpectedColumns[i], { timeout: DRAG_ASSERTION_TIMEOUT }); |
|
|
||
| test(`Focus events should be called when pressing the Ctrl + End key when rowRenderingMode is 'virtual' (scrolling.useNative = ${useNativeScrolling})`, async (t) => { | ||
| test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when rowRenderingMode is 'virtual' (scrolling.useNative = ${useNativeScrolling})`, async (t) => { | ||
| // arrange |
|
|
||
| test(`Focus events should be called when pressing the Ctrl + End key when virtual columns, virtual scrolling and focusedRowEnabled are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { | ||
| test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when virtual columns, virtual scrolling and focusedRowEnabled are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { | ||
| // arrange |
No description provided.