Skip to content

Grids - Stabilize tests (Part 3)#34221

Open
Tucchhaa wants to merge 8 commits into
DevExpress:mainfrom
Tucchhaa:stabilize_tests_26_1
Open

Grids - Stabilize tests (Part 3)#34221
Tucchhaa wants to merge 8 commits into
DevExpress:mainfrom
Tucchhaa:stabilize_tests_26_1

Conversation

@Tucchhaa

@Tucchhaa Tucchhaa commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Tucchhaa Tucchhaa self-assigned this Jul 7, 2026
@Tucchhaa Tucchhaa added the 26_1 label Jul 7, 2026
@Tucchhaa Tucchhaa changed the title DataGrid - Stabilize tests (Part 3) Grids - Stabilize tests (Part 3) Jul 7, 2026
await t.expect(draggingElement.exists).notOk();
}

await triggerDragEnd(columnElement);

@Tucchhaa Tucchhaa Jul 8, 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.

This test was stable, but page reloads are disabled in this fixture, so to prevent any leakage between tests I have added this.

{ dataField: 'Column 1', visible: false },
{ dataField: 'Column 2' },
{ dataField: 'Column 3' },
{ dataField: 'Column 4' },

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 matrix tests iterates through [0, 1, 2] for gapIndex. With 4 columns, testcases for gapIndex==1 and gapIndex==2 basically test the same thing: drag from column chooser to the middle of header panel.

With 3 columns, gapIndex==2 now checks the case when column is dragged to the end of header panel

.ok();

await treeList.apiShowErrorToast();
await treeList.apiShowErrorToast({ displayTime: 100000 });

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.

toast could disappear before the screenshot is taken, which can lead to instability. So I have added more display time

Comment on lines -49 to -51
await t
.expect(dataGrid.getLoadPanel().isVisible())
.ok();

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.

race condition: load panel can hide before this check runs. The test name doesn't suggest that load panel has to be checked, so I have removed this expect

[1],
];

await t.expect(dataGrid.getDataRow(1).element).ok();

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.

wait for the row to appear before checking callback results

await t
.pressKey('pagedown');
.pressKey('pagedown')
.expect(dataGrid.isReady()).ok();

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.

pagedown/pageup cause dataSource load, so it's needed to wait for it to finish


await t.click(dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(19).element);

await dataGrid.scrollBy(t, { left: 0 });

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.

scrollBy accepts displacement and not the exact position. The ticket suggests that dataGrid has to be scrolled to left, but .scrollBy(t, { left: 0 }); has no effect

@Tucchhaa Tucchhaa marked this pull request as ready for review July 8, 2026 07:16
@Tucchhaa Tucchhaa requested a review from a team as a code owner July 8, 2026 07:16
// eslint-disable-next-line no-underscore-dangle
dataGrid._getTemplate = () => ({
render(options) {
setTimeout(() => {

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.

timeouts can affect other tests, since page reloads are disabled

height: 1500,
}));

test('edit => scroll => command, should not result in grid scrolling back to edit', 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 written strangely + this behavior won't reproduce in modern browsers, cuz when element is focused, the browser automatically scrolls to it

await t.wait(100);
await t
.pressKey('ctrl+end')
.expect(dataGrid.isReady()).ok();

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.

ctrl+end causes datasource load, so need to wait for it

@Tucchhaa Tucchhaa changed the base branch from 26_1 to main July 8, 2026 11:26
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.

1 participant