[FIX] test_main_flows: wait buttons to be active before triggering them

Since a1f7aa3362, buttons are deactivated
during action.
This commit is contained in:
Christophe Simonis
2017-07-31 18:59:30 +02:00
parent 28bf5f007f
commit 3becbd764d
@@ -278,7 +278,7 @@ tour.register('main_flow_tour', {
position: "bottom", position: "bottom",
}, { }, {
// Create a quotation // Create a quotation
trigger: ".o_statusbar_buttons > button:contains('New Quotation')", trigger: ".o_statusbar_buttons > button:enabled:contains('New Quotation')",
content: _t('<p><b>Create a quotation</p>'), content: _t('<p><b>Create a quotation</p>'),
position: "right" 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("<p><b>Print this quotation.</b></p>"), content: _t("<p><b>Print this quotation.</b></p>"),
position: "bottom" 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')", extra_trigger: ".o_statusbar_status .btn-primary:contains('Quotation Sent')",
content: _t("Try to send it to email"), content: _t("Try to send it to email"),
position: "bottom", position: "bottom",
@@ -347,7 +347,7 @@ tour.register('main_flow_tour', {
content: _t("Try to send it to email"), content: _t("Try to send it to email"),
position: "bottom", position: "bottom",
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Confirm Sale')", trigger: ".o_statusbar_buttons > button:enabled:contains('Confirm Sale')",
content: _t("<p>Confirm this quotation</p>"), content: _t("<p>Confirm this quotation</p>"),
position: "bottom" position: "bottom"
}, { }, {
@@ -430,15 +430,15 @@ tour.register('main_flow_tour', {
content: _t('Select the generated request for quotation'), content: _t('Select the generated request for quotation'),
position: 'bottom', position: 'bottom',
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Confirm Order')", trigger: ".o_statusbar_buttons > button:enabled:contains('Confirm Order')",
content: _t("Confirm quotation"), content: _t("Confirm quotation"),
position: "bottom", position: "bottom",
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Receive Products')", trigger: ".o_statusbar_buttons > button:enabled:contains('Receive Products')",
content: _t("Receive Product"), content: _t("Receive Product"),
position: "bottom", position: "bottom",
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Validate')", trigger: ".o_statusbar_buttons > button:enabled:contains('Validate')",
content: _t("Validate"), content: _t("Validate"),
position: "bottom", position: "bottom",
}, { }, {
@@ -459,11 +459,11 @@ tour.register('main_flow_tour', {
content: _t("Let's create a new vendor bill"), content: _t("Let's create a new vendor bill"),
position: "right", 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"), content: _t("Try to send it to email"),
position: "bottom", position: "bottom",
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Register Payment')", trigger: ".o_statusbar_buttons > button:enabled:contains('Register Payment')",
content: _t("Register Payment"), content: _t("Register Payment"),
position: "bottom", position: "bottom",
}, { }, {
@@ -491,11 +491,11 @@ tour.register('main_flow_tour', {
content: _t('Select the generated manufacturing order'), content: _t('Select the generated manufacturing order'),
position: 'bottom', position: 'bottom',
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Check availability')", trigger: ".o_statusbar_buttons > button:enabled:contains('Check availability')",
content: _t("Check availability"), content: _t("Check availability"),
position: "bottom", position: "bottom",
}, { }, {
trigger: ".o_statusbar_buttons > button.oe_highlight:contains('Produce')", trigger: ".o_statusbar_buttons > button.oe_highlight:enabled:contains('Produce')",
content: _t("Produce"), content: _t("Produce"),
position: "bottom", position: "bottom",
}, { }, {
@@ -503,7 +503,7 @@ tour.register('main_flow_tour', {
content: _t('Record Production'), content: _t('Record Production'),
position: 'bottom', 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"), content: _t("Mark as Done"),
position: "bottom", position: "bottom",
}, { }, {
@@ -574,7 +574,7 @@ tour.register('main_flow_tour', {
content: _t('Back to the sale order'), content: _t('Back to the sale order'),
position: 'bottom', position: 'bottom',
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Create Invoice')", trigger: ".o_statusbar_buttons > button:enabled:contains('Create Invoice')",
content: _t("Validate"), content: _t("Validate"),
position: "bottom", position: "bottom",
}, { }, {
@@ -582,11 +582,11 @@ tour.register('main_flow_tour', {
content: _t("Create and View Invoices"), content: _t("Create and View Invoices"),
position: "bottom", position: "bottom",
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Validate')", trigger: ".o_statusbar_buttons > button:enabled:contains('Validate')",
content: _t("Validate"), content: _t("Validate"),
position: "bottom", position: "bottom",
}, { }, {
trigger: ".o_statusbar_buttons > button:contains('Register Payment')", trigger: ".o_statusbar_buttons > button:enabled:contains('Register Payment')",
content: _t("Register Payment"), content: _t("Register Payment"),
position: "bottom", position: "bottom",
}, { }, {
@@ -661,7 +661,7 @@ tour.register('main_flow_tour', {
position: 'bottom', position: 'bottom',
}, { }, {
edition: "enterprise", edition: "enterprise",
trigger: ".o_statusbar_buttons > button:contains('Reconcile')", trigger: ".o_statusbar_buttons > button:enabled:contains('Reconcile')",
content: _t('<p><b>Reconcile</p>'), content: _t('<p><b>Reconcile</p>'),
position: "bottom", position: "bottom",
}, { }, {