Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -289,33 +289,15 @@ test('DataGrid - Group row content is scrolled if repaintChangesOnly is enabled

[false, true].forEach((rtlEnabled) => {
// T1284612
test.meta({
browserSize: [900, 800],
unstable: true,
})(`DataGrid - Group summaries are shown over sticky columns on a horizontal scroll (rtl=${rtlEnabled})`, async (t) => {
test(`DataGrid - Group summaries are shown over sticky columns on a horizontal scroll - intersection (rtl=${rtlEnabled})`, async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

const dataGrid = new DataGrid(DATA_GRID_SELECTOR);

await t.expect(dataGrid.isReady()).ok();

await dataGrid.scrollTo(t, { x: rtlEnabled ? 100 : 250 });
await t.wait(300);
await testScreenshot(t, takeScreenshot, `grouping-scroll-total_summary_intersection-rtl=${rtlEnabled}.png`, { element: dataGrid.element });

await dataGrid.apiOption('summary.totalItems', [{
column: 'SaleAmount',
summaryType: 'max',
valueFormat: 'currency',
}]);
await t.wait(300);
await dataGrid.scrollTo(t, { x: 0 });
await t.wait(200);
await dataGrid.scrollTo(t, { x: rtlEnabled ? 100 : 250 });
await t.wait(300);

await testScreenshot(t, takeScreenshot, `grouping-scroll-total_summary-rtl=${rtlEnabled}.png`, { element: dataGrid.element });

await t
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
Expand All @@ -324,6 +306,8 @@ test('DataGrid - Group row content is scrolled if repaintChangesOnly is enabled
rtlEnabled,
customizeColumns(columns) {
columns[2].groupIndex = 0;
columns[1].visible = false;
columns[3].width = 200;
},
summary: {
groupItems: [{
Expand Down Expand Up @@ -370,3 +354,59 @@ test('DataGrid - Group row content is scrolled if repaintChangesOnly is enabled
},
}));
});

[false, true].forEach((rtlEnabled) => {
// T1284612
test(`DataGrid - Group summaries are shown over sticky columns on a horizontal scroll (rtl=${rtlEnabled})`, async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

const dataGrid = new DataGrid(DATA_GRID_SELECTOR);

await t.expect(dataGrid.isReady()).ok();

await testScreenshot(t, takeScreenshot, `grouping-scroll-total_summary-rtl=${rtlEnabled}.png`, { element: dataGrid.element });

await t
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}).before(async () => createWidget('dxDataGrid', {
...defaultConfig,
rtlEnabled,
customizeColumns(columns) {
columns[2].groupIndex = 0;
columns[1].visible = false;
columns[4].width = 150;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: return back previous logic with changing grid option in runtime to change summary.totalItelm and column[index].width. This will save us time on initial page render

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not agree. It is difficult to create one config for 4 cases. Also I do not think initial render takes a lot of time.

},
summary: {
groupItems: [{
column: 'OrderNumber',
summaryType: 'count',
displayFormat: '{0} orders',
}, {
column: 'City',
summaryType: 'max',
valueFormat: 'currency',
showInGroupFooter: false,
alignByColumn: true,
}, {
column: 'TotalAmount',
summaryType: 'max',
valueFormat: 'currency',
showInGroupFooter: false,
alignByColumn: true,
}, {
column: 'TotalAmount',
summaryType: 'sum',
valueFormat: 'currency',
displayFormat: 'Total: {0}',
showInGroupFooter: true,
}],
totalItems: [{
column: 'SaleAmount',
summaryType: 'max',
valueFormat: 'currency',
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The total summary displayFormat string MAXMAXMAXMAX: {0} is hard to interpret and looks like a placeholder. If the intent is to force a long label for layout coverage, consider using a clearer long label (or add a brief inline comment explaining why this specific text is needed) to keep the test configuration self-explanatory.

Suggested change
valueFormat: 'currency',
valueFormat: 'currency',
// Use a deliberately long caption to verify layout/width handling of total summary text.

Copilot uses AI. Check for mistakes.
displayFormat: 'MAXMAXMAXMAX: {0}',
}],
},
}));
});
Loading