[FIX] note: display date picker in activity menu

The date picker should be displayed when clicking on the fa-calendar
when creating a note from activity systray.

The test was missing the assertion checking that the date picker was displayed,
but fixing this issue breaks the test. The datepicker looks to be
asynchronously initialized, and the blur event raises an error because of
that. Since it is difficult to test external libs behaviour, this
step is simply removed from the test.

Task: 1942850

closes odoo/odoo#31241
This commit is contained in:
XavierDo
2019-02-19 11:52:23 +00:00
parent d12c993a28
commit d3b2da41b7
2 changed files with 1 additions and 2 deletions
@@ -118,7 +118,7 @@ ActivityMenu.include({
_onNoteDateTimeSetClick: function (ev) {
ev.preventDefault();
ev.stopPropagation();
this.noteDateTimeWidget.$input.click();
this.noteDateTimeWidget.$input.select();
},
/**
* Saving note (quick create) and updating activity preview
@@ -108,7 +108,6 @@ QUnit.test('note activity menu widget: create note from activity menu', function
// creating quick note with date
activityMenu.$('.o_note_show').click();
activityMenu.$('input.o_note_input').val("New Note");
activityMenu.$('.o_note_set_datetime').click();
activityMenu.$(".o_note_save").click();
assert.strictEqual(activityMenu.$('.o_notification_counter').text(), '2',
"should increment activity notification counter after creating a second note");