summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/helpers/test_utils_create.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-09-05 13:43:51 +0000
committerChristophe Simonis <chs@odoo.com>2019-09-05 13:43:51 +0000
commit7895044a7972e9953cca3365610acf96d497d337 (patch)
tree38ae9d7fb5daff0c81b12fbd8b9942b982e954d0 /addons/web/static/tests/helpers/test_utils_create.js
parent41f7befb8e7309deeff1c6d4a6e5633d1c69f752 (diff)
[FIX] web: unpatch test Views earlier
We need to unpatch the view as soon as we correcly applied the `groupedBy` attribute to avoid sub views to also be patched. closes odoo/odoo#36486 Signed-off-by: Christophe Simonis <chs@odoo.com>
Diffstat (limited to 'addons/web/static/tests/helpers/test_utils_create.js')
-rw-r--r--addons/web/static/tests/helpers/test_utils_create.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/web/static/tests/helpers/test_utils_create.js b/addons/web/static/tests/helpers/test_utils_create.js
index f1c67284707..c9ac01c7b16 100644
--- a/addons/web/static/tests/helpers/test_utils_create.js
+++ b/addons/web/static/tests/helpers/test_utils_create.js
@@ -140,6 +140,7 @@ async function createView(params) {
_updateMVCParams: function () {
this._super.apply(this, arguments);
this.loadParams.groupedBy = params.groupBy || viewOptions.groupBy || [];
+ testUtilsMock.unpatch(View);
},
});
if ('hasSelectors' in params) {
@@ -173,8 +174,6 @@ async function createView(params) {
delete view.destroy;
widget.destroy();
$webClient.remove();
-
- testUtilsMock.unpatch(View);
};
// render the view in a fragment as they must be able to render correctly