From 4e4c89969c88c1b4d1fd4814b54b80ae2312e8a3 Mon Sep 17 00:00:00 2001 From: David Monjoie Date: Mon, 24 Apr 2017 10:57:59 +0200 Subject: [PATCH] [FIX] web: fix FieldStatus tests on extra small screens When enterprise is installed, the rendering of these widgets on extra small screens is different, thus breaking these tests. We need to force the test to run on normal screens. --- .../tests/fields/relational_fields_tests.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index a33a8f076af..37c1f7aeac6 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -3366,6 +3366,9 @@ QUnit.module('relational_fields', { return this._super.apply(this, arguments); }, res_id: 1, + config: { + isMobile: false, + }, }); assert.strictEqual(count, 1, 'once search_read should have been done to fetch the relational values'); @@ -3414,6 +3417,9 @@ QUnit.module('relational_fields', { '
' + '', res_id: 1, + config: { + isMobile: false, + }, }); var $selectedStatus = form.$('.o_statusbar_status button[data-value="4"]'); @@ -3442,6 +3448,9 @@ QUnit.module('relational_fields', { '
' + '', res_id: 1, + config: { + isMobile: false, + }, }); assert.ok(form.$('.o_statusbar_status').hasClass('o_form_field_empty'), @@ -3464,6 +3473,9 @@ QUnit.module('relational_fields', { '
' + '
' + '
', + config: { + isMobile: false, + }, }); assert.strictEqual(form.$('.o_statusbar_status button:disabled').length, 2, "should have 2 status"); @@ -3485,6 +3497,9 @@ QUnit.module('relational_fields', { '
' + '', res_id: 1, + config: { + isMobile: false, + }, }); form.$buttons.find('.o_form_button_edit').click(); @@ -3513,6 +3528,9 @@ QUnit.module('relational_fields', { '' + '', res_id: 1, + config: { + isMobile: false, + }, }); form.$buttons.find('.o_form_button_edit').click(); @@ -3547,6 +3565,9 @@ QUnit.module('relational_fields', { return this._super.apply(this, arguments); }, res_id: 1, + config: { + isMobile: false, + }, }); form.$buttons.find('.o_form_button_edit').click();