-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DataGrid - TagBox tags are incorrectly rendered if the Material/Fluen…
…t theme is used (T1228720) (#27810) Signed-off-by: tongsonbarbs <[email protected]>
- Loading branch information
1 parent
463e0dd
commit 3c8d041
Showing
6 changed files
with
75 additions
and
22 deletions.
There are no files selected for viewing
Binary file added
BIN
+9.45 KB
...eme/tests/dataGrid/etalons/T1228720-grid-tagbox-on-edit_(fluent.blue.light).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
+8.32 KB
...extreme/tests/dataGrid/etalons/T1228720-grid-tagbox-on-edit_(generic.light).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
+11 KB
...e/tests/dataGrid/etalons/T1228720-grid-tagbox-on-edit_(material.blue.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,69 @@ | ||
/* eslint-disable @typescript-eslint/no-floating-promises */ | ||
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; | ||
import DataGrid from 'devextreme-testcafe-models/dataGrid'; | ||
import url from '../../helpers/getPageUrl'; | ||
import { createWidget } from '../../helpers/createWidget'; | ||
import { changeTheme } from '../../helpers/changeTheme'; | ||
import { Themes } from '../../helpers/themes'; | ||
|
||
fixture.disablePageReloads`Tagbox Columns`.page( | ||
url(__dirname, '../container.html'), | ||
); | ||
// T1228720 | ||
[Themes.genericLight, Themes.materialBlue, Themes.fluentBlue].forEach( | ||
(theme) => { | ||
test('Datagrid tagbox column should not look broken', async (t) => { | ||
const dataGrid = new DataGrid('#container'); | ||
const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
await t | ||
.click(dataGrid.getDataCell(0, 1).element) | ||
.expect( | ||
await takeScreenshot( | ||
`T1228720-grid-tagbox-on-edit_(${theme}).png`, | ||
dataGrid.element, | ||
), | ||
) | ||
.ok() | ||
.expect(compareResults.isValid()) | ||
.ok(compareResults.errorMessages()); | ||
}) | ||
.before(async () => { | ||
await changeTheme(theme); | ||
await createWidget('dxDataGrid', { | ||
showBorders: true, | ||
allowColumnResizing: true, | ||
dataSource: [{ id: 1, items: [1, 2, 3, 4, 5] }], | ||
columns: [ | ||
'id', | ||
{ | ||
dataField: 'items', | ||
editCellTemplate(container, cellInfo) { | ||
($('<div/>') as any) | ||
.dxTagBox({ | ||
dataSource: Array.from({ length: 10 }, (_, index) => ({ | ||
id: index + 1, | ||
text: `item ${index + 1}`, | ||
})), | ||
value: cellInfo.value, | ||
valueExpr: 'id', | ||
displayExpr: 'text', | ||
onValueChanged(e) { | ||
cellInfo.setValue(e.value); | ||
}, | ||
onSelectionChanged() { | ||
cellInfo.component.updateDimensions(); | ||
}, | ||
searchEnabled: true, | ||
}) | ||
.appendTo(container); | ||
}, | ||
}, | ||
], | ||
editing: { mode: 'batch', allowUpdating: true }, | ||
}); | ||
}) | ||
.after(async () => { | ||
await changeTheme(Themes.genericLight); | ||
}); | ||
}, | ||
); |
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