Skip to content

Commit 06cc108

Browse files
TucchhaaEldar Iusupzhanov
andauthored
Grids stabilize tests after toolbar KBN changes (DevExpress#34397)
Co-authored-by: Eldar Iusupzhanov <eldar.iusupzhanov@users.noreply.github.com>
1 parent f031aa4 commit 06cc108

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

e2e/testcafe-devextreme/tests/dataGrid/common/columnReordering/visual.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { testScreenshot } from '../../../../helpers/themeUtils';
88
fixture.disablePageReloads`Column reordering.Visual`
99
.page(url(__dirname, '../../../container.html'));
1010

11-
test.skip('column separator should work properly with expand columns', async (t) => {
11+
test('column separator should work properly with expand columns', async (t) => {
1212
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
1313
const dataGrid = new DataGrid('#container');
1414

e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withGrouping.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,18 @@ test.meta({ browserSize: [900, 800] })('Sticky columns with grouping - overflow
181181
// visual: generic.light
182182
// visual: material.blue.light
183183
// visual: fluent.blue.light
184-
test.meta({ browserSize: [900, 800] })('The header row should be highlighted correctly when dragging column when there are fixed columns and allowColumnReordering=false (generic.light theme)', async (t) => {
184+
test.meta({ browserSize: [900, 800] })('The header row should be highlighted correctly when dragging column when there are fixed columns and allowColumnReordering=false', async (t) => {
185185
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
186186
const dataGrid = new DataGrid('#container');
187187

188188
await t.expect(dataGrid.isReady()).ok();
189-
await t.wait(300);
190189

191190
await t.drag(dataGrid.getGroupPanel().getHeader(0).element, 200, 35);
192-
await t.wait(200);
191+
192+
await t.expect(dataGrid.getHeaders().getHeaderRow(0).isHighlighted()).ok();
193193

194194
await testScreenshot(t, takeScreenshot, 'header_row_highlight_with_fixed_columns.png', { element: dataGrid.element });
195+
195196
await t
196197
.expect(compareResults.isValid())
197198
.ok(compareResults.errorMessages());

packages/testcafe-models/dataGrid/headers/row.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import FocusableElement from '../../internal/focusable';
22
import HeaderCell from './cell';
33
import CommandCell from '../commandCell';
4+
import Widget from '../../internal/widget';
5+
6+
const CLASS = {
7+
dropHighlight: 'drop-highlight',
8+
};
49

510
export default class HeaderRow extends FocusableElement {
611
widgetName: string;
@@ -37,4 +42,8 @@ export default class HeaderRow extends FocusableElement {
3742
getCommandCell(index: number): CommandCell {
3843
return new CommandCell(this.element, index, this.widgetName);
3944
}
45+
46+
isHighlighted(): Promise<boolean> {
47+
return this.element.hasClass(Widget.addClassPrefix(this.widgetName, CLASS.dropHighlight));
48+
}
4049
}

0 commit comments

Comments
 (0)