From 5a589e8c0abda256f6e34f07aff8dc307cb1d76e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 2 Oct 2018 16:36:23 +0200 Subject: [PATCH] [FIX] website_sale_coupon: force option activation to avoid race condition --- tests/test_shop_sale_coupon.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_shop_sale_coupon.py b/tests/test_shop_sale_coupon.py index 982cbd5de8b..5f3a128ee2b 100644 --- a/tests/test_shop_sale_coupon.py +++ b/tests/test_shop_sale_coupon.py @@ -2,10 +2,18 @@ import odoo.tests + class TestUi(odoo.tests.HttpCase): post_install = True at_install = False def test_01_admin_shop_sale_coupon_tour(self): - self.phantom_js("/", "odoo.__DEBUG__.services['web_tour.tour'].run('shop_sale_coupon')", "odoo.__DEBUG__.services['web_tour.tour'].tours.shop_sale_coupon.ready", login="admin") + # pre enable "Show # found" option to avoid race condition... + self.env.ref("website_sale.search count").write({"active": True}) + self.phantom_js( + "/", + "odoo.__DEBUG__.services['web_tour.tour'].run('shop_sale_coupon')", + "odoo.__DEBUG__.services['web_tour.tour'].tours.shop_sale_coupon.ready", + login="admin", + )