From 3becbd764d7af69a58014afa64dce5c85b07aae6 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 31 Jul 2017 18:59:30 +0200 Subject: [PATCH] [FIX] test_main_flows: wait buttons to be active before triggering them Since a1f7aa3362eded33f7142e218e74acad98367511, buttons are deactivated during action. --- .../test_main_flows/static/src/js/tour.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/odoo/addons/test_main_flows/static/src/js/tour.js b/odoo/addons/test_main_flows/static/src/js/tour.js index 107c5d62c65..bf96428dff6 100644 --- a/odoo/addons/test_main_flows/static/src/js/tour.js +++ b/odoo/addons/test_main_flows/static/src/js/tour.js @@ -278,7 +278,7 @@ tour.register('main_flow_tour', { position: "bottom", }, { // Create a quotation - trigger: ".o_statusbar_buttons > button:contains('New Quotation')", + trigger: ".o_statusbar_buttons > button:enabled:contains('New Quotation')", content: _t('

Create a quotation

'), position: "right" }, { @@ -325,11 +325,11 @@ tour.register('main_flow_tour', { } }, }, { - trigger: ".o_statusbar_buttons > button.o_sale_print", + trigger: ".o_statusbar_buttons > button.o_sale_print:enabled", content: _t("

Print this quotation.

"), position: "bottom" }, { - trigger: ".o_statusbar_buttons > button:contains('Send by Email')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Send by Email')", extra_trigger: ".o_statusbar_status .btn-primary:contains('Quotation Sent')", content: _t("Try to send it to email"), position: "bottom", @@ -347,7 +347,7 @@ tour.register('main_flow_tour', { content: _t("Try to send it to email"), position: "bottom", }, { - trigger: ".o_statusbar_buttons > button:contains('Confirm Sale')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Confirm Sale')", content: _t("

Confirm this quotation

"), position: "bottom" }, { @@ -430,15 +430,15 @@ tour.register('main_flow_tour', { content: _t('Select the generated request for quotation'), position: 'bottom', }, { - trigger: ".o_statusbar_buttons > button:contains('Confirm Order')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Confirm Order')", content: _t("Confirm quotation"), position: "bottom", }, { - trigger: ".o_statusbar_buttons > button:contains('Receive Products')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Receive Products')", content: _t("Receive Product"), position: "bottom", }, { - trigger: ".o_statusbar_buttons > button:contains('Validate')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Validate')", content: _t("Validate"), position: "bottom", }, { @@ -459,11 +459,11 @@ tour.register('main_flow_tour', { content: _t("Let's create a new vendor bill"), position: "right", }, { - trigger: ".o_statusbar_buttons > button:contains('Validate')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Validate')", content: _t("Try to send it to email"), position: "bottom", }, { - trigger: ".o_statusbar_buttons > button:contains('Register Payment')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Register Payment')", content: _t("Register Payment"), position: "bottom", }, { @@ -491,11 +491,11 @@ tour.register('main_flow_tour', { content: _t('Select the generated manufacturing order'), position: 'bottom', }, { - trigger: ".o_statusbar_buttons > button:contains('Check availability')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Check availability')", content: _t("Check availability"), position: "bottom", }, { - trigger: ".o_statusbar_buttons > button.oe_highlight:contains('Produce')", + trigger: ".o_statusbar_buttons > button.oe_highlight:enabled:contains('Produce')", content: _t("Produce"), position: "bottom", }, { @@ -503,7 +503,7 @@ tour.register('main_flow_tour', { content: _t('Record Production'), position: 'bottom', }, { - trigger: ".o_statusbar_buttons > button:contains('Mark as Done')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Mark as Done')", content: _t("Mark as Done"), position: "bottom", }, { @@ -574,7 +574,7 @@ tour.register('main_flow_tour', { content: _t('Back to the sale order'), position: 'bottom', }, { - trigger: ".o_statusbar_buttons > button:contains('Create Invoice')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Create Invoice')", content: _t("Validate"), position: "bottom", }, { @@ -582,11 +582,11 @@ tour.register('main_flow_tour', { content: _t("Create and View Invoices"), position: "bottom", }, { - trigger: ".o_statusbar_buttons > button:contains('Validate')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Validate')", content: _t("Validate"), position: "bottom", }, { - trigger: ".o_statusbar_buttons > button:contains('Register Payment')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Register Payment')", content: _t("Register Payment"), position: "bottom", }, { @@ -661,7 +661,7 @@ tour.register('main_flow_tour', { position: 'bottom', }, { edition: "enterprise", - trigger: ".o_statusbar_buttons > button:contains('Reconcile')", + trigger: ".o_statusbar_buttons > button:enabled:contains('Reconcile')", content: _t('

Reconcile

'), position: "bottom", }, {