[FIX] web: datepicker did not select correct date after initial render

This commit is contained in:
Christophe Matthieu
2017-05-15 16:19:37 +02:00
parent 2e6a1623ff
commit 932e887400
2 changed files with 4 additions and 4 deletions
@@ -1257,7 +1257,7 @@ QUnit.module('basic_fields', {
});
QUnit.test('date field in form view', function (assert) {
assert.expect(7);
assert.expect(8);
var form = createView({
View: FormView,
@@ -1290,6 +1290,7 @@ QUnit.module('basic_fields', {
// click on the input and select another value
form.$('.o_datepicker_input').click();
assert.ok(form.$('.bootstrap-datetimepicker-widget').length, 'datepicker should be open');
assert.strictEqual(form.$('.day.active').data('day'), '02/03/2017', 'datepicker should be highlight February 3');
form.$('.bootstrap-datetimepicker-widget .picker-switch').first().click(); // Month selection
form.$('.bootstrap-datetimepicker-widget .picker-switch').first().click(); // Year selection
form.$('.bootstrap-datetimepicker-widget .year:contains(2017)').click();
@@ -1393,7 +1394,6 @@ QUnit.module('basic_fields', {
form.destroy();
});
QUnit.module('FieldDatetime');
QUnit.test('datetime field in form view', function (assert) {