Skip to content
Permalink
Browse files

[IMP]improvement after rebase as promisify branch has been merged

  • Loading branch information...
msh-odoo committed Mar 19, 2019
1 parent 7b8da6a commit 23db656d0c88a2bef77a5357bd0f15aa5039efa3
Showing with 5 additions and 3 deletions.
  1. +5 −3 addons/web/static/tests/views/mobile_control_panel_tests.js
@@ -43,19 +43,19 @@ QUnit.module('Mobile Search view Screen', {
assert.expect(5);


var actionManager = createActionManager({
var actionManager = await createActionManager({
actions: this.actions,
archs: this.archs,
data: this.data,
});

actionManager.doAction(1);
await actionManager.doAction(1);

assert.ok(!$('.o_mobile_search').is(':visible'),
'mobile search view is not visible');

// toggle the quick search input
testUtils.dom.click($('button.o_enable_searchview'));
await testUtils.dom.click($('button.o_enable_searchview'));

assert.deepEqual($(".o_mobile_quick_search").children().length, 3,
"Quick search input and filter icon added");
@@ -64,11 +64,13 @@ QUnit.module('Mobile Search view Screen', {
$('.o_searchview_input').trigger($.Event('keypress', {
which: 97,
}));
await testUtils.nextTick();

$('.o_searchview_input').trigger($.Event('keyup', {
which: $.ui.keyCode.ENTER,
keyCode: $.ui.keyCode.ENTER,
}));
await testUtils.nextTick();

assert.deepEqual($(".o_searchview_input_container > .o_searchview_facet").length, 1,
"Quick search facet are added");

0 comments on commit 23db656

Please sign in to comment.
You can’t perform that action at this time.