Skip to content

Fix unstable tests#33267

Open
Raushen wants to merge 5 commits intoDevExpress:26_1from
Raushen:Fix-unstable-8-26_1
Open

Fix unstable tests#33267
Raushen wants to merge 5 commits intoDevExpress:26_1from
Raushen:Fix-unstable-8-26_1

Conversation

@Raushen
Copy link
Copy Markdown
Contributor

@Raushen Raushen commented Apr 14, 2026

No description provided.

@Raushen Raushen self-assigned this Apr 14, 2026
@Raushen Raushen requested a review from a team as a code owner April 14, 2026 16:42
Copilot AI review requested due to automatic review settings April 14, 2026 16:42
@Raushen Raushen added the 26_1 label Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to reduce TestCafe E2E test flakiness by ensuring widget readiness checks (isReady()) are performed via retryable TestCafe assertions rather than being awaited as a one-shot boolean check, and by adding an ESLint rule to enforce that pattern going forward.

Changes:

  • Replaced await <widget>.isReady() with await t.expect(<widget>.isReady()).ok() across several DataGrid/TreeList/FilterBuilder/CardView tests.
  • Fixed a couple of before hooks to properly await createWidget(...) so widget initialization completes before the test runs.
  • Added a custom ESLint rule (no-is-ready-without-expect) and enabled it (currently scoped to DataGrid and CardView tests).

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withGrouping.ts Switches readiness check to retryable t.expect(...).ok() to reduce flakiness.
e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts Uses t.expect(...).ok() for readiness and awaits createWidget in before hook.
e2e/testcafe-devextreme/tests/dataGrid/common/markup/T1163515_alternateRowGroupBorders.ts Converts readiness check to t.expect(...).ok().
e2e/testcafe-devextreme/tests/dataGrid/common/headerFilter/headerFilter.ts Converts readiness check to t.expect(...).ok().
e2e/testcafe-devextreme/tests/dataGrid/common/grouping/calculateGroupValueRuntimeChanges.ts Converts multiple readiness checks to t.expect(...).ok().
e2e/testcafe-devextreme/tests/dataGrid/common/filterRow/visual.ts Converts readiness check to t.expect(...).ok().
e2e/testcafe-devextreme/tests/dataGrid/common/filterRow/functional.ts Converts readiness checks to t.expect(...).ok().
e2e/testcafe-devextreme/tests/dataGrid/common/editing/visual.ts Adds an eslint-disable for a local helper returning isReady() (see review comment re: retry behavior).
e2e/testcafe-devextreme/tests/dataGrid/common/columnChooser.ts Converts readiness check to t.expect(...).ok().
e2e/testcafe-devextreme/tests/dataGrid/common/adaptivity/functional.ts Converts readiness check to t.expect(...).ok().
e2e/testcafe-devextreme/tests/common/treeList/toast.ts Uses t.expect(...).ok() for readiness and awaits createWidget in before hook.
e2e/testcafe-devextreme/tests/common/treeList/rowDragging.ts Converts readiness check to t.expect(...).ok().
e2e/testcafe-devextreme/tests/common/treeList/adaptiveRow.ts Converts readiness check to t.expect(...).ok().
e2e/testcafe-devextreme/tests/common/filterBuilder/filterBuilderScrolling.ts Converts readiness check to t.expect(...).ok().
e2e/testcafe-devextreme/tests/cardView/editing/editing.functional.ts Converts readiness checks to t.expect(...).ok() for CardView.
e2e/testcafe-devextreme/eslint.config.mjs Registers and enables the new local ESLint rule (currently scoped to DataGrid + CardView test globs).
e2e/testcafe-devextreme/eslint-rules/no-is-ready-without-expect.js Adds custom ESLint rule to disallow calling .isReady() outside of t.expect().
Comments suppressed due to low confidence (1)

e2e/testcafe-devextreme/tests/dataGrid/common/editing/visual.ts:316

  • scrollTo returns dataGrid.isReady(), but the caller does t.expect(await scrollTo(...)).ok(). Because the promise is awaited before passing into t.expect, TestCafe won’t retry the readiness check and this can still be flaky after scrolling. Consider making scrollTo perform the scroll and then assert readiness via t.expect(dataGrid.isReady()).ok(...) (or pass the promise directly to t.expect without awaiting) so readiness is retried with TestCafe’s assertion timeout.
      const scrollTo = async (y) => {
        await dataGrid.scrollTo(t, { y });
        // eslint-disable-next-line local/no-is-ready-without-expect
        return dataGrid.isReady();
      };

      const screenshotName = `grid-new-row_position-${newRowPosition}_scroll-mode-${scrollMode}_top-${scrollTop}.png`;

      await t
        .expect(await scrollTo(scrollTop))
        .ok(`scrollTo ${scrollTop}`)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants