Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2248,6 +2248,12 @@ fixture`Editing - ShowEditorAlways`
test('Cells should be focused correctly on click when cell editing mode is used with enabled showEditorAlways (T1037019)', async (t) => {
const dataGrid = new DataGrid('#container');

const getStoredName = ClientFunction((id: number) => (window as any).myStore
.byKey(id)
.then((item) => item.Name));

await t.expect(dataGrid.isReady()).ok();

// act
await t
.click(dataGrid.getDataCell(0, 0).getEditor().element);
Expand All @@ -2262,9 +2268,10 @@ test('Cells should be focused correctly on click when cell editing mode is used
// act
await t
.typeText(dataGrid.getDataCell(0, 0).getEditor().element, '1')
.wait(50)
.click(dataGrid.getDataCell(1, 0).getEditor().element);

await t.expect(getStoredName(1)).eql('Name 11');

// assert
await t
.expect(dataGrid.apiGetCellValue(0, 0))
Expand All @@ -2277,9 +2284,10 @@ test('Cells should be focused correctly on click when cell editing mode is used
// act
await t
.typeText(dataGrid.getDataCell(1, 0).getEditor().element, '2')
.wait(50)
.click(dataGrid.getDataCell(2, 0).getEditor().element);

await t.expect(getStoredName(2)).eql('Name 22');

// assert
await t
.expect(dataGrid.apiGetCellValue(1, 0))
Expand All @@ -2292,9 +2300,10 @@ test('Cells should be focused correctly on click when cell editing mode is used
// act
await t
.typeText(dataGrid.getDataCell(2, 0).getEditor().element, '3')
.wait(50)
.click(dataGrid.getDataCell(1, 0).getEditor().element);

await t.expect(getStoredName(3)).eql('Name 33');

// assert
await t
.expect(dataGrid.apiGetCellValue(2, 0))
Expand All @@ -2307,9 +2316,10 @@ test('Cells should be focused correctly on click when cell editing mode is used
// act
await t
.typeText(dataGrid.getDataCell(1, 0).getEditor().element, '2')
.wait(50)
.click(dataGrid.getDataCell(0, 0).getEditor().element);

await t.expect(getStoredName(2)).eql('Name 222');

// assert
await t
.expect(dataGrid.apiGetCellValue(1, 0))
Expand Down
Loading