Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tongsonbarbs committed Aug 30, 2024
1 parent 306bb8d commit 828cc94
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,38 +135,3 @@ test('Focused cell should not flick (T1206435)', async (t) => {
};
});
});

/* test('DataGrid input cell should not put tabindex to incorrect element while on edit mode (T1239462)', async (t) => {
const dataGrid = new DataGrid('#container');
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
await t
.click(dataGrid.getToolbar().getItem(0))
.pressKey('tab');
await takeScreenshot('data-grid_keyboard-navigation-input-text-focused.png', dataGrid.element);
await t.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}).before(async () => {
await createWidget('dxDataGrid', {
showBorders: true,
selection: {
mode: 'multiple',
},
editing: {
mode: 'form',
allowAdding: true,
},
columns: [
'Calculation',
'CalculationType',
{
type: 'buttons',
fixed: true,
},
],
dataSource: {
store: [],
},
});
}); */
Original file line number Diff line number Diff line change
Expand Up @@ -4730,6 +4730,41 @@ test('DataGrid - Data rows are skipped during Tab navigation if the first column
width: 300,
}));

test('DataGrid input cell should not put tabindex to incorrect element while on edit mode (T1239462)', async (t) => {
const dataGrid = new DataGrid('#container');
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

await t
.click(dataGrid.getToolbar().getItem(0))
.pressKey('tab');
await takeScreenshot('data-grid_keyboard-navigation-input-text-focused.png', dataGrid.element);

await t.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}).before(async () => {
await createWidget('dxDataGrid', {
showBorders: true,
selection: {
mode: 'multiple',
},
editing: {
mode: 'form',
allowAdding: true,
},
columns: [
'Calculation',
'CalculationType',
{
type: 'buttons',
fixed: true,
},
],
dataSource: {
store: [],
},
});
});

test('Cancel button in the last column cannot be focused via the Tab key (T1248987)', async (t) => {
const dataGrid = new DataGrid('#container');
const saveButton = dataGrid.getFixedDataRow(0).getCommandCell(1).getButton(0);
Expand Down Expand Up @@ -4760,6 +4795,8 @@ test('Cancel button in the last column cannot be focused via the Tab key (T12489
},
columnFixing: {
enabled: true,
// @ts-expect-error private option
legacyMode: true,
},
columns: [
'FirstName',
Expand Down

0 comments on commit 828cc94

Please sign in to comment.