[FIX] web_responsive: Complete search feature forward-porting

This commit is contained in:
Jairo Llopis
2018-08-01 11:26:20 +01:00
committed by Pedro M. Baeza
parent bcdce5aaf5
commit 5723f17fde
4 changed files with 55 additions and 95 deletions

View File

@@ -118,35 +118,6 @@ odoo.define('web_responsive.test', function(require) {
}
);
QUnit.test('It should return keybuffer + new key',
function(assert) {
assert.expect(1);
this.drawer.keyBuffer = 'TES';
var res = this.drawer.handleKeyBuffer(84);
assert.equal(res, 'TEST');
}
);
QUnit.test('It should clear keybuffer after timeout',
function(assert) {
assert.expect(1);
this.drawer.keyBuffer = 'TES';
this.drawer.keyBufferTime = 10;
this.drawer.handleKeyBuffer(84);
var self = this;
var d = $.Deferred();
setTimeout(function() {
assert.equal(self.drawer.keyBuffer, "");
d.resolve();
}, 100);
return d;
}
);
QUnit.test('It should trigger core bus event for drawer close',
function(assert) {
assert.expect(1);
@@ -224,7 +195,7 @@ odoo.define('web_responsive.test', function(require) {
var $appLink = $('#a_1'),
$expect = $('#a_2'),
$res = this.drawer.findAdjacentAppLink(
$res = this.drawer.findAdjacentLink(
$appLink, this.drawer.RIGHT
);
@@ -239,7 +210,7 @@ odoo.define('web_responsive.test', function(require) {
this.linkGrid();
var $appLink = $('#a_2'),
$expect = $('#a_1'),
$res = this.drawer.findAdjacentAppLink(
$res = this.drawer.findAdjacentLink(
$appLink, this.drawer.LEFT
);
assert.equal($res[0].id, $expect[0].id);
@@ -253,7 +224,7 @@ odoo.define('web_responsive.test', function(require) {
this.linkGrid();
var $appLink = $('#a_1'),
$expect = $('#a_0'),
$res = this.drawer.findAdjacentAppLink(
$res = this.drawer.findAdjacentLink(
$appLink, this.drawer.UP
);
assert.equal($res[0].id, $expect[0].id);
@@ -267,7 +238,7 @@ odoo.define('web_responsive.test', function(require) {
this.linkGrid();
var $appLink = $('#a_1'),
$expect = $('#a_2'),
$res = this.drawer.findAdjacentAppLink(
$res = this.drawer.findAdjacentLink(
$appLink, this.drawer.DOWN
);
assert.equal($res[0].id, $expect[0].id);
@@ -281,7 +252,7 @@ odoo.define('web_responsive.test', function(require) {
this.linkGrid();
var $appLink = $('#b_2'),
$expect = $('#a_0'),
$res = this.drawer.findAdjacentAppLink(
$res = this.drawer.findAdjacentLink(
$appLink, this.drawer.RIGHT
);
assert.equal($res[0].id, $expect[0].id);
@@ -295,7 +266,7 @@ odoo.define('web_responsive.test', function(require) {
this.linkGrid();
var $appLink = $('#a_0'),
$expect = $('#a_2'),
$res = this.drawer.findAdjacentAppLink(
$res = this.drawer.findAdjacentLink(
$appLink, this.drawer.UP
);
assert.equal($res[0].id, $expect[0].id);
@@ -309,7 +280,7 @@ odoo.define('web_responsive.test', function(require) {
this.linkGrid();
var $appLink = $('#a_2'),
$expect = $('#a_0'),
$res = this.drawer.findAdjacentAppLink(
$res = this.drawer.findAdjacentLink(
$appLink, this.drawer.DOWN
);
assert.equal($res[0].id, $expect[0].id);