From 84389729392df491d5a67ebe25a8fa44beac1930 Mon Sep 17 00:00:00 2001 From: Antoine Guenet Date: Mon, 9 Oct 2023 14:05:43 +0200 Subject: [PATCH] [FIX] web_editor, test_lint: clean test HTML in utils tests Test HTML being inserted for the utils tests was not cleaned at the end of the tests. X-original-commit: 092cee52b343665ea3ca90e4f4aa302318a763b5 Part-of: odoo/odoo#138549 --- .../static/src/js/editor/odoo-editor/test/spec/utils.test.js | 2 ++ odoo/addons/test_lint/tests/eslintrc | 1 + 2 files changed, 3 insertions(+) diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/test/spec/utils.test.js b/addons/web_editor/static/src/js/editor/odoo-editor/test/spec/utils.test.js index 31d60229dfd..00e93ff4fa4 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/test/spec/utils.test.js +++ b/addons/web_editor/static/src/js/editor/odoo-editor/test/spec/utils.test.js @@ -67,6 +67,8 @@ const insertTestHtml = innerHtml => { }; describe('Utils', () => { + afterEach(cleanTestHtml); + //------------------------------------------------------------------------------ // Position and sizes //------------------------------------------------------------------------------ diff --git a/odoo/addons/test_lint/tests/eslintrc b/odoo/addons/test_lint/tests/eslintrc index cddd8e31af7..8186bfa7d9d 100644 --- a/odoo/addons/test_lint/tests/eslintrc +++ b/odoo/addons/test_lint/tests/eslintrc @@ -46,6 +46,7 @@ "chai": "readonly", "describe": "readonly", "it": "readonly", + "afterEach": "readonly", "mocha": "readonly", "DOMPurify": "readonly" }