Skip to content

Commit 249be3b

Browse files
committed
Fix unit test failure
1 parent 9a6dbd6 commit 249be3b

File tree

1 file changed

+7
-7
lines changed
  • dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element

1 file changed

+7
-7
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element/date.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,26 +86,26 @@ define([
8686
it('Prefers pickerDateTimeFormat for date-only display format', function () {
8787
// simulate UI XML providing pickerDateTimeFormat while showsTime is false
8888
model.options.showsTime = false;
89-
model.options.pickerDateTimeFormat = 'y-MM-dd';
89+
model.options.pickerDateTimeFormat = 'MM/dd/y';
9090

9191
// Re-init to adopt option and set options.dateFormat accordingly
9292
model.initConfig();
9393

94-
expect(model.options.dateFormat).toBe('y-MM-dd');
94+
expect(model.options.dateFormat).toBe('MM/dd/y');
9595
});
9696

9797
it('Displays value using pickerDateTimeFormat when date-only', function () {
9898
model.options.showsTime = false;
9999
// Ensure consistent IO formats for this test case
100-
model.outputDateFormat = 'y-MM-dd';
101-
model.inputDateFormat = 'y-MM-dd';
102-
model.pickerDateTimeFormat = 'y-MM-dd';
100+
model.outputDateFormat = 'MM/dd/y';
101+
model.inputDateFormat = 'MM/dd/y';
102+
model.pickerDateTimeFormat = 'MM/dd/y';
103103

104104
// Make sure formats are prepared
105105
model.prepareDateTimeFormats();
106106

107-
model.value('2025-11-21');
108-
expect(model.getPreview()).toBe('2025-11-21');
107+
model.value('21-11-2025');
108+
expect(model.getPreview()).toBe('21-11-2025');
109109
});
110110
});
111111
});

0 commit comments

Comments
 (0)