Skip to content

Commit

Permalink
unit test cases for date adapter added
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharyar-shamshi committed Feb 29, 2024
1 parent be4d55a commit cf64f7b
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@ describe('<AdapterMomentHijri />', () => {

expectFieldValueV7(v7Response.getSectionsContainer(), localizedTexts[localeKey].value);
});

it('should set month, year, and date correctly', () => {
const initialDate = adapter.date('2020-01-01T23:44:00.000Z')!;
const newDate = adapter.setMonthYearDate(initialDate, 2018, 4, 15);

const v7Response = renderWithProps({
enableAccessibleFieldDOMStructure: true,
value: newDate,
});
expectFieldValueV7(v7Response.getSectionsContainer(), '١٤٣٩/٠٨/٢٩ ٠٩:٣٥');
});
});
});

Expand All @@ -118,6 +107,17 @@ describe('<AdapterMomentHijri />', () => {
clock,
Component: DateTimeField,
});

it('should set month, year, and date correctly', () => {
const initialDate = adapter.date('2020-01-01T23:44:00.000Z')!;
const newDate = adapter.setMonthYearDate(initialDate, 2018, 4, 15);

const v7Response = renderWithProps({
enableAccessibleFieldDOMStructure: true,
value: newDate,
});
expectFieldValueV7(v7Response.getSectionsContainer(), '١٤٣٩/٠٨/٢٩ ٠٩:٣٥');
});
});
});
});

0 comments on commit cf64f7b

Please sign in to comment.