From f71c33230a70202a85ad1068ce1f722d482345ed Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 22 Mar 2018 17:03:06 +0100 Subject: [PATCH] [FIX] website_sale_coupon: change tour trigger since class remove The `oe_website_sale` class got removed by commit https://github.com/odoo/odoo/commit/809776914613b28814b24419b4a9ba40d40f7b9b The tour that needed that class need to be changed to trigger on something else --- static/src/js/website_sale_coupon.test.js | 26 +++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/static/src/js/website_sale_coupon.test.js b/static/src/js/website_sale_coupon.test.js index 1ce783c54c0..60bafbee212 100644 --- a/static/src/js/website_sale_coupon.test.js +++ b/static/src/js/website_sale_coupon.test.js @@ -11,6 +11,15 @@ tour.register('shop_sale_coupon', { 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 iPad Mini, enable coupon code & insert 10% code */ { content: "type iPad Mini in search", @@ -23,7 +32,7 @@ tour.register('shop_sale_coupon', { }, { content: "select iPad Mini", - extra_trigger: '.oe_website_sale_search', // Wait to be on search results or it sometimes throws concurent error (sent search form + click on product on /shop) + 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("iPad Mini")', }, { @@ -91,7 +100,7 @@ tour.register('shop_sale_coupon', { trigger: '#wrap:not(:has(#cart_products))', run: function () {}, // it's a check }, - /* 4. Disabled coupon box */ + /* 4. Disabled customize options coupon box & 'Show # found'*/ { content: "open customize menu", extra_trigger: '.oe_website_sale .oe_cart', @@ -101,6 +110,19 @@ tour.register('shop_sale_coupon', { content: "click on 'Coupon Code'", trigger: "#customize-menu a:contains(Coupon Code)", }, + { + content: "click on 'Continue Shopping'", + trigger: "a:contains(Continue Shopping)", + }, + { + content: "open customize menu", + extra_trigger: '.oe_website_sale #products_grid', + trigger: '#customize-menu > a', + }, + { + content: "click on 'Show # found'", + trigger: "#customize-menu a:contains(Show # found)", + }, ] );