From 863b86ea9fefddcc72c76376af97a00211ccc0b4 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Tue, 14 Aug 2018 11:34:40 +0200 Subject: [PATCH] [FIX] website_sale_coupon: make test determinist avoid race condition when refresh of /shop finish after the search click. Now we start on the search page directly, that make tour faster and that don't remove any usefull test, since the purpose of this test is to test coupon and not the search view already tested by others tests. --- static/src/js/website_sale_coupon.test.js | 25 +---------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/static/src/js/website_sale_coupon.test.js b/static/src/js/website_sale_coupon.test.js index 6195c9db5cd..88b3b885ced 100644 --- a/static/src/js/website_sale_coupon.test.js +++ b/static/src/js/website_sale_coupon.test.js @@ -7,32 +7,13 @@ var base = require("web_editor.base"); tour.register('shop_sale_coupon', { test: true, - url: '/shop', + url: '/shop?search=Large%20Cabinet', wait_for: base.ready() }, [ - /* 0. Test 'Show # found' customize option works correctly */ - { - content: "open customize menu", - trigger: '#customize-menu > a', - }, - { - content: "click on 'Show # found'", - trigger: "#customize-menu a:contains(Show # found)", - }, /* 1. Buy 1 Large Cabinet, enable coupon code & insert 10% code */ - { - content: "type Large Cabinet in search", - trigger: 'form input[name="search"]', - run: "text Large Cabinet", - }, - { - content: "start search", - trigger: 'form:has(input[name="search"]) .oe_search_button', - }, { content: "select Large Cabinet", - extra_trigger: '.oe_search_found', // Wait to be on search results or it sometimes throws concurent error (sent search form + click on product on /shop) trigger: '.oe_product_cart a:contains("Large Cabinet")', }, { @@ -123,10 +104,6 @@ tour.register('shop_sale_coupon', { extra_trigger: '.oe_website_sale #products_grid', trigger: '#customize-menu > a', }, - { - content: "click on 'Show # found'", - trigger: "#customize-menu a:contains(Show # found)", - }, ] );