-
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 - Opening an editor with the Enter key is inconsistent when …
…scrolling is enabled (T1190668) (#25719)
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
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
37 changes: 37 additions & 0 deletions
37
testing/testcafe/tests/dataGrid/keyboardNavigation/startEditing.functional.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,37 @@ | ||
import url from '../../../helpers/getPageUrl'; | ||
import createWidget from '../../../helpers/createWidget'; | ||
import DataGrid from '../../../model/dataGrid'; | ||
|
||
fixture`Keyboard Navigation - editOnKeyPress` | ||
.page(url(__dirname, '../../container.html')); | ||
|
||
const DATA_GRID_SELECTOR = '#container'; | ||
|
||
test('Editing should start by pressing enter after scrolling content with scrolling.mode=virtual', async (t) => { | ||
const dataGrid = new DataGrid(DATA_GRID_SELECTOR); | ||
|
||
await dataGrid.scrollBy({ y: 10000 }); | ||
|
||
await t.click(dataGrid.getDataCell(49, 1).element); | ||
await t.pressKey('enter'); | ||
|
||
await t.expect(dataGrid.getDataCell(49, 1).getEditor().element.focused).ok(); | ||
}).before(async () => { | ||
await createWidget('dxDataGrid', { | ||
dataSource: [...new Array(50)].map((_, i) => ({ | ||
data1: i * 2, | ||
data2: i * 2 + 1, | ||
})), | ||
columns: [ | ||
'data1', | ||
'data2', | ||
], | ||
editing: { | ||
allowUpdating: true, | ||
}, | ||
scrolling: { | ||
mode: 'virtual', | ||
}, | ||
height: 300, | ||
}); | ||
}); |