-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #705 from magento-fearless-kiwis/Fearless-Kiwis-MA…
…GETWO-60765 Fearless kiwis magetwo 60765
- Loading branch information
Showing
4 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element/date-time.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
/*eslint max-nested-callbacks: 0*/ | ||
|
||
define([ | ||
'Magento_Ui/js/form/element/date', | ||
'mageUtils', | ||
'moment' | ||
], function (DateElement, utils, moment) { | ||
'use strict'; | ||
|
||
describe('Magento_Ui/js/form/element/date', function () { | ||
var params, model; | ||
|
||
beforeEach(function () { | ||
params = { | ||
dataScope: 'abstract', | ||
options: { | ||
showsTime: true | ||
} | ||
}; | ||
model = new DateElement(params); | ||
}); | ||
|
||
it('Check prepareDateTimeFormats function', function () { | ||
spyOn(utils, 'convertToMomentFormat').and.callThrough(); | ||
model.prepareDateTimeFormats(); | ||
expect(utils.convertToMomentFormat).toHaveBeenCalled(); | ||
}); | ||
|
||
it('Check onShiftedValueChange function', function () { | ||
spyOn(moment, 'tz').and.callThrough(); | ||
model.onShiftedValueChange('2016-12-23 9:11 PM'); | ||
expect(moment.tz).toHaveBeenCalled(); | ||
}); | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters