diff --git a/addons/web/static/src/js/views/abstract_controller.js b/addons/web/static/src/js/views/abstract_controller.js index 53afb4a1fbd..0bd156516fa 100644 --- a/addons/web/static/src/js/views/abstract_controller.js +++ b/addons/web/static/src/js/views/abstract_controller.js @@ -479,7 +479,6 @@ var AbstractController = mvc.Controller.extend(ActionMixin, { additional_context: _.extend({}, data.context) }); } - return false; }, /** * FIXME: this logic should be rethought diff --git a/addons/web/static/tests/views/abstract_view_banner_tests.js b/addons/web/static/tests/views/abstract_view_banner_tests.js index 21532ed60d9..c9d750f47b6 100644 --- a/addons/web/static/tests/views/abstract_view_banner_tests.js +++ b/addons/web/static/tests/views/abstract_view_banner_tests.js @@ -40,13 +40,33 @@ QUnit.module('Views', { QUnit.test("The banner should be fetched from the route", function (assert) { var done = assert.async(); - assert.expect(5); + assert.expect(6); - var banner_html = - '
' + - '' + - '
' + - '
'; + var banner_html =` + +
+
+ + + +
+
+ +
Here is the banner
+
+
`; createAsyncView({ View: TestView, @@ -73,6 +93,12 @@ QUnit.module('Views', { var $banner_link = $('link[href$="' + test_css_url + '"]', $banner); assert.strictEqual($banner_link.length, 0, "The stylesheet should have been removed from the banner."); + + testUtils.dom.click(view.$('.o_onboarding_btn_close')); // click on close to remove banner + testUtils.dom.click(view.$('.o_technical_modal .btn-primary:contains("Remove")')); // click on button remove from techinal modal + assert.strictEqual(view.$('.o_onboarding_container.show').length, 0, + "Banner should be removed from the view"); + view.destroy(); done(); });