-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📌 Sticky columns: The focus borders are not displayed correctly for g…
…roup row, group footer and fields of adaptive row when there are fixed columns (#28389)
- Loading branch information
Showing
9 changed files
with
140 additions
and
3 deletions.
There are no files selected for viewing
Binary file added
BIN
+59 KB
...extreme/tests/dataGrid/stickyColumns/etalons/datagrid_adaptive_item_focused.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
+58.9 KB
...reme/tests/dataGrid/stickyColumns/etalons/datagrid_group_footer_row_focused.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
+66.6 KB
...-devextreme/tests/dataGrid/stickyColumns/etalons/datagrid_group_row_focused.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions
120
e2e/testcafe-devextreme/tests/dataGrid/stickyColumns/focusOverlay.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,120 @@ | ||
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; | ||
import DataGrid from 'devextreme-testcafe-models/dataGrid'; | ||
import { createWidget } from '../../../helpers/createWidget'; | ||
import url from '../../../helpers/getPageUrl'; | ||
import { getData } from '../helpers/generateDataSourceData'; | ||
|
||
const DATA_GRID_SELECTOR = '#container'; | ||
|
||
fixture.disablePageReloads`FixedColumns - Focus Overlay` | ||
.page(url(__dirname, '../../container.html')); | ||
|
||
test('Focus overlay should be displayed correctly if sticky columns are turned on', async (t) => { | ||
const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
|
||
const dataGrid = new DataGrid(DATA_GRID_SELECTOR); | ||
|
||
await t.expect(dataGrid.isReady()).ok(); | ||
|
||
await t | ||
.click(dataGrid.getGroupRow(0).element) | ||
.pressKey('tab'); | ||
|
||
await takeScreenshot('datagrid_group_row_focused.png', dataGrid.element); | ||
|
||
await t | ||
.click(dataGrid.getDataRow(2).getCommandCell(40).getAdaptiveButton()) | ||
.pressKey('tab'); | ||
|
||
await takeScreenshot('datagrid_adaptive_item_focused.png', dataGrid.element); | ||
|
||
await t | ||
.click(dataGrid.getGroupFooterRow().nth(0)) | ||
.pressKey('tab'); | ||
|
||
await takeScreenshot('datagrid_group_footer_row_focused.png', dataGrid.element); | ||
|
||
await t | ||
.expect(compareResults.isValid()) | ||
.ok(compareResults.errorMessages()); | ||
}).before(async () => createWidget('dxDataGrid', { | ||
dataSource: getData(20, 40), | ||
columnFixing: { | ||
enabled: true, | ||
}, | ||
groupPanel: { | ||
visible: true, | ||
}, | ||
width: 800, | ||
showColumnHeaders: true, | ||
columnAutoWidth: true, | ||
allowColumnReordering: true, | ||
allowColumnResizing: true, | ||
summary: { | ||
totalItems: [{ | ||
column: 'field_1', | ||
summaryType: 'count', | ||
}, { | ||
column: 'field_6', | ||
summaryType: 'count', | ||
}], | ||
groupItems: [{ | ||
column: 'field_0', | ||
summaryType: 'count', | ||
showInGroupFooter: false, | ||
alignByColumn: true, | ||
}, | ||
{ | ||
column: 'field_11', | ||
summaryType: 'count', | ||
showInGroupFooter: false, | ||
alignByColumn: true, | ||
}, { | ||
column: 'field_6', | ||
summaryType: 'count', | ||
showInGroupFooter: true, | ||
}], | ||
}, | ||
customizeColumns(columns) { | ||
columns[5].fixed = true; | ||
columns[6].fixed = true; | ||
|
||
columns[11].fixed = true; | ||
columns[11].fixedPosition = 'right'; | ||
columns[12].fixed = true; | ||
columns[12].fixedPosition = 'right'; | ||
|
||
columns.splice(15, 5, { | ||
caption: 'Band column 1', | ||
columns: [{ | ||
caption: 'Nested column 1', | ||
columns: ['field_15', 'field_16'], | ||
}, | ||
'field_17', | ||
{ | ||
caption: 'Nested column 2', | ||
columns: ['field_18', 'field_19'], | ||
}], | ||
}); | ||
|
||
columns.splice(25, 4, { | ||
caption: 'Band column 2', | ||
columns: [ | ||
'field_29', | ||
{ | ||
caption: 'Nested column 3', | ||
columns: ['field_30', 'field_31'], | ||
}, | ||
'field_32', | ||
], | ||
}); | ||
|
||
columns[0].hidingPriority = 0; | ||
columns[columns.length - 1].hidingPriority = 1; | ||
columns[columns.length - 2].hidingPriority = 2; | ||
columns[columns.length - 3].hidingPriority = 3; | ||
|
||
columns[1].groupIndex = 0; | ||
columns[2].groupIndex = 1; | ||
}, | ||
})); |
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 |
---|---|---|
|
@@ -1080,7 +1080,7 @@ | |
border-collapse: separate; | ||
} | ||
|
||
.dx-focused-fixed-cell { | ||
.dx-focused-fixed-element { | ||
z-index: 3; | ||
} | ||
|
||
|
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