-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DataGrid - Sticky Columns - support master-detail, summary & grouping (…
- Loading branch information
Showing
22 changed files
with
789 additions
and
50 deletions.
There are no files selected for viewing
433 changes: 433 additions & 0 deletions
433
e2e/testcafe-devextreme/tests/dataGrid/stickyColumns/data.ts
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+64.3 KB
...tcafe-devextreme/tests/dataGrid/stickyColumns/etalons/grouping-scroll-begin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+59.4 KB
...cafe-devextreme/tests/dataGrid/stickyColumns/etalons/grouping-scroll-center.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+73.8 KB
...estcafe-devextreme/tests/dataGrid/stickyColumns/etalons/grouping-scroll-end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+101 KB
...e-devextreme/tests/dataGrid/stickyColumns/etalons/masterdetail-scroll-begin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87 KB
...-devextreme/tests/dataGrid/stickyColumns/etalons/masterdetail-scroll-center.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+90.8 KB
...afe-devextreme/tests/dataGrid/stickyColumns/etalons/masterdetail-scroll-end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions
77
e2e/testcafe-devextreme/tests/dataGrid/stickyColumns/withGrouping.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; | ||
import DataGrid from 'devextreme-testcafe-models/dataGrid'; | ||
import { safeSizeTest } from '../../../helpers/safeSizeTest'; | ||
import { createWidget } from '../../../helpers/createWidget'; | ||
import url from '../../../helpers/getPageUrl'; | ||
import { defaultConfig } from './data'; | ||
|
||
const DATA_GRID_SELECTOR = '#container'; | ||
|
||
fixture.disablePageReloads`FixedColumns - Grouping` | ||
.page(url(__dirname, '../../container.html')); | ||
|
||
safeSizeTest('Sticky columns with grouping & summary', async (t) => { | ||
const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
|
||
const dataGrid = new DataGrid(DATA_GRID_SELECTOR); | ||
|
||
await takeScreenshot('grouping-scroll-begin.png', dataGrid.element); | ||
|
||
await dataGrid.scrollTo(t, { x: 100 }); | ||
await takeScreenshot('grouping-scroll-center.png', dataGrid.element); | ||
|
||
await dataGrid.scrollTo(t, { x: 10000 }); | ||
await takeScreenshot('grouping-scroll-end.png', dataGrid.element); | ||
|
||
await t | ||
.expect(compareResults.isValid()) | ||
.ok(compareResults.errorMessages()); | ||
}, [900, 800]).before(async () => createWidget('dxDataGrid', { | ||
...defaultConfig, | ||
customizeColumns(columns) { | ||
columns[2].groupIndex = 0; | ||
}, | ||
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: 'OrderNumber', | ||
summaryType: 'count', | ||
displayFormat: '{0} orders', | ||
}, { | ||
column: 'SaleAmount', | ||
summaryType: 'max', | ||
valueFormat: 'currency', | ||
}, { | ||
column: 'TotalAmount', | ||
summaryType: 'max', | ||
valueFormat: 'currency', | ||
}, { | ||
column: 'TotalAmount', | ||
summaryType: 'sum', | ||
valueFormat: 'currency', | ||
displayFormat: 'Total: {0}', | ||
}], | ||
}, | ||
})); |
39 changes: 39 additions & 0 deletions
39
e2e/testcafe-devextreme/tests/dataGrid/stickyColumns/withMasterDetail.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; | ||
import DataGrid from 'devextreme-testcafe-models/dataGrid'; | ||
import { safeSizeTest } from '../../../helpers/safeSizeTest'; | ||
import { createWidget } from '../../../helpers/createWidget'; | ||
import url from '../../../helpers/getPageUrl'; | ||
import { defaultConfig } from './data'; | ||
|
||
const DATA_GRID_SELECTOR = '#container'; | ||
|
||
fixture.disablePageReloads`FixedColumns - MasterDetail` | ||
.page(url(__dirname, '../../container.html')); | ||
|
||
safeSizeTest('Sticky columns with master-detail', async (t) => { | ||
const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
|
||
const dataGrid = new DataGrid(DATA_GRID_SELECTOR); | ||
await dataGrid.apiExpandRow(1); | ||
|
||
await takeScreenshot('masterdetail-scroll-begin.png', dataGrid.element); | ||
|
||
await dataGrid.scrollTo(t, { x: 100 }); | ||
await takeScreenshot('masterdetail-scroll-center.png', dataGrid.element); | ||
|
||
await dataGrid.scrollTo(t, { x: 10000 }); | ||
await takeScreenshot('masterdetail-scroll-end.png', dataGrid.element); | ||
|
||
await t | ||
.expect(compareResults.isValid()) | ||
.ok(compareResults.errorMessages()); | ||
}, [900, 800]).before(async () => createWidget('dxDataGrid', { | ||
...defaultConfig, | ||
masterDetail: { | ||
enabled: true, | ||
template(container) { | ||
$(container) | ||
.text('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'); | ||
}, | ||
}, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.