-
Notifications
You must be signed in to change notification settings - Fork 667
Refactor test #33004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 26_1
Are you sure you want to change the base?
Refactor test #33004
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -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()); | ||||||||
|
|
@@ -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: [{ | ||||||||
|
|
@@ -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(); | ||||||||
|
|
||||||||
Raushen marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
| 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; | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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', | ||||||||
|
||||||||
| valueFormat: 'currency', | |
| valueFormat: 'currency', | |
| // Use a deliberately long caption to verify layout/width handling of total summary text. |
Uh oh!
There was an error while loading. Please reload this page.