Skip to content

Grids stabilize tests after toolbar KBN changes#34364

Merged
Tucchhaa merged 9 commits into
DevExpress:mainfrom
Tucchhaa:fix_test_26_2
Jul 21, 2026
Merged

Grids stabilize tests after toolbar KBN changes#34364
Tucchhaa merged 9 commits into
DevExpress:mainfrom
Tucchhaa:fix_test_26_2

Conversation

@Tucchhaa

Copy link
Copy Markdown
Contributor

No description provided.

@Tucchhaa Tucchhaa self-assigned this Jul 17, 2026
@Tucchhaa Tucchhaa added the 26_2 label Jul 17, 2026
Eldar Iusupzhanov and others added 5 commits July 20, 2026 17:03
Signed-off-by: Eldar Iusupzhanov <84278206+Tucchhaa@users.noreply.github.com>
@Tucchhaa
Tucchhaa marked this pull request as ready for review July 20, 2026 13:08
@Tucchhaa
Tucchhaa requested a review from a team as a code owner July 20, 2026 13:08
@Tucchhaa Tucchhaa changed the title Grids stabilize tests Grids stabilize tests after toolbar KBN changes Jul 20, 2026
await removeStylesheetRulesFromPage();
});

test('HeaderRow should be highlighted when dragging column with allowColumnReordering=false', async (t) => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this test was not flaky, but its test case is similar to the flaky one, so I have added styles to prevent its flakiness in the future

await removeStylesheetRulesFromPage();
});

test('The group separator should not appear when dragging a grouped column to the same position', async (t) => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this test was not flaky, but its test case is similar to the flaky one, so I have added styles to prevent its flakiness in the future

because in e2e tests flaky outline would appear
*/
await insertStylesheetRulesToPage(`
.dx-group-panel-item[tabindex]:focus-visible:not(.dx-toolbar-item) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this :focus-visible outline reproducible for real users, or does it only appear with TestCafe's synthetic drag events? if it can happen in real usage, it probably belongs in the product SCSS rather than only in the tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

outline doesn't appear in real usage only in testcafe

because in e2e tests flaky outline would appear
*/
await insertStylesheetRulesToPage(`
.dx-group-panel-item[tabindex]:focus-visible:not(.dx-toolbar-item) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is [tabindex] intended here instead of [tabindex="0"] like in the toolbar rule? matching items with tabindex="-1" might catch something we don't want

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it doesn't matter, the tests only need :focus-visible selector's outline to be suppressed, because datagrid has its own styles for :focus selector. I have removed [tabindex] from the selector.

Overrides the toolbar items' :focus-visible outline,
because in e2e tests flaky outline would appear
*/
await insertStylesheetRulesToPage(`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this override block is repeated 4 times across this file and withGrouping.ts - could it be extracted into a shared constant in domUtils.ts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Make sense, I have created a helper func

await t.drag(dataGrid.getGroupPanel().getHeader(0).element, 200, 35);
await t.wait(200);

await t.expect(dataGrid.getHeaders().getHeaderRow(0).isHighlighted()).ok();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is the outline override still needed now that the explicit isHighlighted() wait is in place, or does the flaky outline still appear without it?

@Tucchhaa Tucchhaa Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's still needed. I have added isHighlighted() to remove t.wait, but it doesn't resolve flakiness

@Tucchhaa
Tucchhaa added this pull request to the merge queue Jul 21, 2026
Merged via the queue into DevExpress:main with commit 0233646 Jul 21, 2026
101 checks passed
@Tucchhaa
Tucchhaa deleted the fix_test_26_2 branch July 21, 2026 11:36
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.

3 participants