Skip to content

Commit

Permalink
fix form tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeniyKiyashko committed Jan 13, 2025
1 parent d8eda67 commit ea67a92
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 41 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ safeSizeTest('Geometry is good', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const dateBox = new DateBox('#container');

await dateBox.option('opened', true);

await testScreenshot(t, takeScreenshot, 'Datebox with calendar.png');

await dateBox.option('type', 'datetime');
Expand All @@ -40,7 +42,6 @@ safeSizeTest('Geometry is good', async (t) => {
await waitFont();

return createWidget('dxDateBox', {
opened: true,
pickerType: 'calendar',
width: 200,
value: new Date(1.5e12),
Expand Down
40 changes: 21 additions & 19 deletions e2e/testcafe-devextreme/tests/form/form.simpleItem.labelMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,32 @@ fixture.disablePageReloads`Form`
test(testName, async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

await waitFont();

await testScreenshot(t, takeScreenshot, `${testName}.png`, { element: '#container' });

await t
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}).before(async () => createWidget('dxForm', {
width: 200,
rtlEnabled,
labelMode,
showOptionalMark,
optionalMark: 'opt',
requiredMark: '**',
formData: {
item1: 'some value',
},
items: [
{ itemType: 'empty' },
{ dataField: 'item1', isRequired: true },
{ dataField: 'item2', isRequired: true },
{ dataField: 'item3', isRequired: false },
],
}));
}).before(async () => {
await waitFont();

return createWidget('dxForm', {
width: 200,
rtlEnabled,
labelMode,
showOptionalMark,
optionalMark: 'opt',
requiredMark: '**',
formData: {
item1: 'some value',
},
items: [
{ itemType: 'empty' },
{ dataField: 'item1', isRequired: true },
{ dataField: 'item2', isRequired: true },
{ dataField: 'item3', isRequired: false },
],
});
});
});
});
});
Expand Down
44 changes: 23 additions & 21 deletions e2e/testcafe-devextreme/tests/form/form.simpleItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,34 @@ fixture.disablePageReloads`Form`
test('widget alignment (T1086611)', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

await waitFont();

await testScreenshot(t, takeScreenshot, `Form with labelLocation=${labelLocation}.png`, { element: '#container' });

await t
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}).before(async () => createWidget('dxForm', {
labelLocation,
colCount: 2,
width: 1000,
formData: {},
items: [{
dataField: 'FirstName',
editorType: 'dxTextBox',
}, {
dataField: 'Position',
editorType: 'dxSelectBox',
}, {
dataField: 'BirthDate',
editorType: 'dxDateBox',
}, {
dataField: 'Notes',
editorType: 'dxTextArea',
}],
}));
}).before(async () => {
await waitFont();

return createWidget('dxForm', {
labelLocation,
colCount: 2,
width: 1000,
formData: {},
items: [{
dataField: 'FirstName',
editorType: 'dxTextBox',
}, {
dataField: 'Position',
editorType: 'dxSelectBox',
}, {
dataField: 'BirthDate',
editorType: 'dxDateBox',
}, {
dataField: 'Notes',
editorType: 'dxTextArea',
}],
});
});
});

[() => 'xs', () => 'md', () => 'lg'].forEach((screenByWidth) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ea67a92

Please sign in to comment.