Skip to content
Merged
Show file tree
Hide file tree
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 @@ -150,12 +150,12 @@ test('The AI column should not be hidden when there is a second AI column with a

test('The AI column should have value in the adaptive detail row', async (t) => {
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);
await t.expect(dataGrid.isReady()).ok();

// act
await resolveAIRequest();

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

const adaptiveButton = dataGrid.getAdaptiveButton();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ fixture.disablePageReloads`Column reordering`
// T975549
test('The column reordering should work correctly when there is a fixed column with zero width', async (t) => {
const dataGrid = new DataGrid('#container');
await t.expect(dataGrid.isReady()).ok();

const headers = dataGrid.getHeaders();
const headerRow = headers.getHeaderRow(0);

Expand Down Expand Up @@ -72,6 +74,7 @@ test('The column reordering should work correctly when there is a fixed column w
// T1038094
test('The separator should display correctly when dragging column', async (t) => {
const dataGrid = new DataGrid('#container');
await t.expect(dataGrid.isReady()).ok();

await dataGrid.moveHeader(0, 200, 5, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fixture.disablePageReloads`Column reordering.Visual`
test('column separator should work properly with expand columns', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const dataGrid = new DataGrid('#container');

await t.expect(dataGrid.isReady()).ok();
await MouseUpEvents.disable(MouseAction.dragToOffset);

await t.drag(dataGrid.getGroupPanel().getHeader(0).element, 0, 30);
Expand Down Expand Up @@ -53,6 +55,8 @@ test('column separator should work properly with expand columns', async (t) => {
test('HeaderRow should be highlighted when dragging column with allowColumnReordering=false', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const dataGrid = new DataGrid('#container');
await t.expect(dataGrid.isReady()).ok();

await MouseUpEvents.disable(MouseAction.dragToOffset);

await t.drag(dataGrid.getGroupPanel().getHeader(0).element, 0, 30);
Expand Down Expand Up @@ -96,6 +100,8 @@ test('The group separator should not appear when dragging a grouped column to th
const dataGrid = new DataGrid('#container');
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

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

await t.drag(dataGrid.getGroupPanel().getHeader(0).element, -25, 20);

await testScreenshot(t, takeScreenshot, 'dragging_grouped_column_to_same_position.png', { element: dataGrid.element });
Expand Down
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
Loading