-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DataGrid(T1171870): DataGrid - The 'dx-focused' class is not removed …
…from a grid cell when it loses focus. (#24951) Co-authored-by: Ilya Vinogradov <ilya.vinogradov@devexpress.com>
- Loading branch information
1 parent
1d67ad9
commit dc74136
Showing
8 changed files
with
56 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import createWidget from '../../../helpers/createWidget'; | ||
import url from '../../../helpers/getPageUrl'; | ||
import DataGrid from '../../../model/dataGrid'; | ||
|
||
fixture.disablePageReloads`Focus` | ||
.page(url(__dirname, '../../container.html')); | ||
|
||
const GRID_SELECTOR = '#container'; | ||
const FOCUSED_CLASS = 'dx-focused'; | ||
|
||
test('Should remove dx-focused class on blur event from the cell', async (t) => { | ||
const dataGrid = new DataGrid(GRID_SELECTOR); | ||
|
||
const firstCell = dataGrid.getDataCell(0, 1); | ||
const secondCell = dataGrid.getDataCell(1, 1); | ||
|
||
await t | ||
.click(firstCell.element) | ||
.click(secondCell.element); | ||
|
||
await t.expect(firstCell.element().hasClass(FOCUSED_CLASS)).notOk(); | ||
await t.expect(secondCell.element().hasClass(FOCUSED_CLASS)).ok(); | ||
}).before(async () => createWidget('dxDataGrid', { | ||
dataSource: [ | ||
{ A: 0, B: 1, C: 2 }, | ||
{ A: 3, B: 4, C: 5 }, | ||
{ A: 6, B: 7, C: 8 }, | ||
], | ||
editing: { | ||
mode: 'batch', | ||
allowUpdating: true, | ||
startEditAction: 'dblClick', | ||
}, | ||
onCellClick: (event) => event.component.focus(event.cellElement), | ||
})); |
10 changes: 5 additions & 5 deletions
10
.../dataGrid/focusEvents/T1162227_newRows.ts → ...rid/focus/focusEvents/newRows_T1162227.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
File renamed without changes
File renamed without changes
8 changes: 4 additions & 4 deletions
8
...ing/testcafe/tests/dataGrid/focusedRow.ts → ...s/dataGrid/focus/focusedRow/focusedRow.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
12 changes: 6 additions & 6 deletions
12
...tcafe/tests/dataGrid/focusedRow/markup.ts → ...tests/dataGrid/focus/focusedRow/markup.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