From 7e3f8f2140fb174c7dcd3b970862966690de4252 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 9 Aug 2017 10:14:25 +0200 Subject: [PATCH] [IMP] web: in test use prepend instead of append to create the view Prevents false positive error in tests. Issue: If an error occurs that the view remains visible, then other tests that use a pointer or focus can not be performed. Errors occur because the new views are introduced afterwards and are therefore not always visible. --- addons/web/static/tests/helpers/test_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/tests/helpers/test_utils.js b/addons/web/static/tests/helpers/test_utils.js index 343f04d9fad..fdc70507a12 100644 --- a/addons/web/static/tests/helpers/test_utils.js +++ b/addons/web/static/tests/helpers/test_utils.js @@ -152,7 +152,7 @@ function createAsyncView(params) { }); // reproduce the DOM environment of views - var $web_client = $('
').addClass('o_web_client').appendTo($target); + var $web_client = $('
').addClass('o_web_client').prependTo($target); var $control_panel = $('
').addClass('o_control_panel').appendTo($web_client); var $content = $('
').addClass('o_content').appendTo($web_client); var $view_manager = $('
').addClass('o_view_manager_content').appendTo($content);