[FIX] *: resolve the last tour step warnings

When we haven't provided a custom action, the tour step runs the default
action. In the final step of the tour, when there is no `run` or
`isCheck` provided, It shows warnings of 'ignoring action (auto) of last
step' as it can lead to a race condition.

This commit resolves the warnings: `ignoring action (auto) of last step`

task-3429500

closes odoo/odoo#129239

Related: odoo/enterprise#46683
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
divy-odoo
2023-09-04 15:02:47 +00:00
committed by Romain Derie
parent 443c209ed0
commit cea1cab535
50 changed files with 120 additions and 10 deletions
@@ -124,5 +124,6 @@ registry.category("web_tour.tours").add('account_tax_group', {
{
content: "Check tax value is reset",
trigger: '.o_tax_group_amount_value:contains("120")',
isCheck: true,
},
]});
@@ -56,7 +56,8 @@ registry.category("web_tour.tours").add('totp_admin_self_invite', {
}
}, {
content: "check that user cannot invite themself.",
trigger: "body.CannotInviteYourself"
trigger: "body.CannotInviteYourself",
isCheck: true,
}]});
registry.category("web_tour.tours").add('totp_admin_invite', {
@@ -71,4 +72,5 @@ registry.category("web_tour.tours").add('totp_admin_invite', {
}, {
content: "check that demo user can be invited to use 2FA.",
trigger: "button:contains(Invite to use 2FA)",
isCheck: true,
}]});
@@ -67,6 +67,7 @@
{
trigger: '.o_event_title:contains("TEST EVENT")',
content: 'Check the event title',
isCheck: true,
},
]});
@@ -119,6 +120,7 @@
{
content: 'Wait declined status',
trigger: '.o_attendee_status_declined',
isCheck: true,
},
]});
@@ -149,5 +151,6 @@
{
content: 'Wait declined status',
trigger: '.o_attendee_status_declined',
isCheck: true,
},
]});
@@ -51,5 +51,6 @@
run: 'click',
},{
trigger: '.o_kanban_renderer',
isCheck: true,
}
]});
@@ -84,5 +84,6 @@
trigger: ".o_menu_brand",
extra_trigger: ".o_reward_rainbow",
content: "last rainbowman appears",
isCheck: true,
}
]});
@@ -82,6 +82,12 @@ registry.category("web_tour.tours").add('hr_holidays_tour', {
{
trigger: 'button[name="action_approve"]',
content: _t("Let's approve it"),
position: 'bottom'
position: 'bottom',
},
{
trigger: `tr.o_data_row:first:not(:has(button[name="action_approve"]))`,
content: "Verify leave is approved",
auto: true,
isCheck: true,
}
]});
@@ -9,6 +9,7 @@ const requestChatSteps = [
},
{
trigger: ".o-mail-ChatWindow",
isCheck: true,
},
];
@@ -37,6 +38,7 @@ registry.category("web_tour.tours").add("im_livechat_request_chat_and_send_messa
},
{
trigger: ".o-mail-Message:contains('Hello, I need help')",
isCheck: true,
},
],
});
@@ -88,5 +88,10 @@ registry.category("web_tour.tours").add("mail_tour", {
),
position: "bottom",
},
{
trigger: ".o-discuss-ChannelSelector",
auto: true,
isCheck: true,
}
],
});
@@ -30,6 +30,7 @@ registry.category("web_tour.tours").add("mail_activity_schedule_from_chatter", {
},
{
trigger: ".o-mail-Message:contains('Play Mario Kart')",
isCheck: true,
},
],
});
@@ -104,6 +104,7 @@ registry.category("web_tour.tours").add("mail/static/tests/tours/mail_full_compo
{
content: "Check message contains the attachment",
trigger: '.o-mail-Message .o-mail-AttachmentCard:contains("text.txt")',
isCheck: true,
},
],
});
@@ -34,6 +34,11 @@ class Do {
trigger: ".pos-rightheader .floor-button",
mobile: true,
},
{
content: "Check the product page",
trigger: ".product-list-container .product-list",
isCheck: true,
},
];
}
@@ -365,6 +370,10 @@ class Check {
content: "go back to the products",
trigger: ".pos-rightheader .floor-button",
mobile: true,
}, {
content: "Check the product page",
trigger: ".product-list-container .product-list",
isCheck: true,
});
return res;
}
@@ -414,6 +423,11 @@ class Check {
trigger: ".pos-rightheader .floor-button",
mobile: true,
},
{
content: "Check the product page",
trigger: ".product-list-container .product-list",
isCheck: true,
}
];
}
totalTaxIs(amount) {
+2 -1
View File
@@ -12,7 +12,8 @@ registry.category("web_tour.tours").add('portal_load_homepage', {
},
{
content: "Load my account details",
trigger: 'input[value="Joel Willis"]'
trigger: 'input[value="Joel Willis"]',
isCheck: true,
}
]
});
@@ -101,5 +101,6 @@ registry.category("web_tour.tours").add("self_order_after_meal_cart_tour", {
PosSelf.check.isPrimaryBtn("My Orders"),
PosSelf.action.clickPrimaryBtn("My Orders"),
PosSelf.action.clickBack(),
PosSelf.check.isPrimaryBtn("View Menu"),
],
});
@@ -73,4 +73,5 @@ registry.category("web_tour.tours").add('burndown_chart_tour', {
}, {
content: 'The comparison menu is not rendered',
trigger: ':not(:has(.o_comparison_menu))',
isCheck: true,
}]});
@@ -88,6 +88,10 @@ const projectSharingSteps = [...stepUtils.goToAppSteps("project.menu_main_pm", '
}, {
trigger: 'iframe button.o_switch_view.o_list',
content: 'Go to the list view',
}, {
trigger: 'iframe .o_list_view',
content: 'Check the list view',
isCheck: true,
}];
registry.category("web_tour.tours").add('project_sharing_tour', {
@@ -22,7 +22,11 @@ function openProjectUpdateAndReturnToTasks(view, viewClass) {
trigger: '.o_back_button',
content: 'Go back to the task view : ' + view,
// extra_trigger: '.o_list_view', // FIXME: [XBO] uncomment it when the sample data will be displayed after discarding the creation of a project update record.
},
}, {
trigger: `.${viewClass}`,
content: 'Check the task view : ' + view,
isCheck: true,
}
];
}
@@ -17,5 +17,6 @@
},
{
trigger: 'iframe .o_report_stock_rule',
isCheck: true,
},
]});
@@ -98,6 +98,7 @@ var lastSteps = [{
}
}, {
trigger: 'h1.tour_success',
isCheck: true,
}];
registry.category("web_tour.tours").add('test_certification_failure', {
@@ -92,5 +92,6 @@ registry.category("web_tour.tours").add('test_certification_success', {
}, {
content: "test passed",
trigger: 'div:contains("Congratulations, you have passed the test!")',
isCheck: true,
}
]});
@@ -63,5 +63,6 @@ registry.category("web_tour.tours").add('test_survey', {
{
content: 'Thank you',
trigger: 'h1:contains("Thank you!")',
isCheck: true,
}
]});
@@ -67,6 +67,7 @@ registry.category("web_tour.tours").add('test_survey_chained_conditional_questio
{
content: 'Thank you',
trigger: 'h1:contains("Thank you!")',
isCheck: true,
}
]});
@@ -146,6 +146,7 @@ registry.category("web_tour.tours").add('test_survey_prefill', {
$('.o_survey_title').addClass('tour_success_2');
}
}, {
trigger: '.o_survey_title.tour_success_2'
trigger: '.o_survey_title.tour_success_2',
isCheck: true,
}
]});
@@ -81,5 +81,6 @@ wTourUtils.registerWebsitePreviewTour("snippet_popup_display_on_click", {
in_modal: false,
extra_trigger: ".o_website_preview[data-view-xmlid='website.homepage']",
trigger: "iframe .s_popup .modal[id='Win-%2420'].show",
isCheck: true,
},
]);
@@ -57,4 +57,5 @@ wTourUtils.registerWebsitePreviewTour("snippet_version", {
content: "s_share is outdated",
extra_trigger: 'we-customizeblock-options:contains(Share) .snippet-option-VersionControl > we-alert',
trigger: 'iframe body',
isCheck: true,
}]);
@@ -492,6 +492,7 @@
content: 'Verify that the recipient email has been saved',
// We have to this that way because the input type = hidden.
trigger: 'iframe form:has(input[name="email_to"][value="test@test.test"])',
isCheck: true,
},
]);
@@ -153,7 +153,8 @@ registry.category("web_tour.tours").add("website_form_editor_tour_submit", {
},
{
content: "Check form is submitted without errors",
trigger: "#wrap:has(h1:contains('Thank You!'))"
trigger: "#wrap:has(h1:contains('Thank You!'))",
isCheck: true,
}
]});
@@ -187,6 +188,7 @@ registry.category("web_tour.tours").add("website_form_editor_tour_results", {
content: "Check mail.mail records have been created",
trigger: "#website_form_editor_success_test_tour_mail_mail",
allowInvisible: true,
isCheck: true,
}
]});
registry.category("web_tour.tours").add('website_form_contactus_submit', {
@@ -210,5 +212,6 @@ registry.category("web_tour.tours").add('website_form_contactus_submit', {
{
content: 'Check form is submitted without errors',
trigger: '#wrap:has(h1:contains("Thank You!"))',
isCheck: true,
},
]});
@@ -87,5 +87,9 @@
extra_trigger: "iframe body:not(.editor_enable)",
position: "bottom",
content: Markup(_t("<b>Publish your blog post</b> to make it visible to your visitors.")),
},
}, {
trigger: '.o_menu_systray_item a:contains("Published")',
auto: true,
isCheck: true,
}
]);
@@ -22,6 +22,7 @@
{
content: "Ensure form model has changed and page reload is done after save",
trigger: "iframe section.s_website_form form[data-model_name='crm.lead']",
isCheck: true,
}]);
registry.category("web_tour.tours").add('website_crm_tour', {
@@ -56,7 +57,8 @@
trigger: ".s_website_form_send"
}, {
content: "Check we were redirected to the success page",
trigger: "#wrap:has(h1:contains('Thank You!'))"
trigger: "#wrap:has(h1:contains('Thank You!'))",
isCheck: true,
}]});
registry.category("web_tour.tours").add('website_crm_catch_logged_partner_info_tour', {
@@ -75,7 +77,8 @@
trigger: ".s_website_form_send"
}, {
content: "Check we were redirected to the success page",
trigger: "#wrap:has(h1:contains('Thank You!'))"
trigger: "#wrap:has(h1:contains('Thank You!'))",
isCheck: true,
}]});
export default {};
@@ -52,5 +52,5 @@ registry.category("web_tour.tours").add('test_tickets_questions', {
// The tour stops too early and the registration fails if we don't wait the confirmation.
content: 'Wait for confirmation',
trigger: '.o_wereg_confirmed, .oe_cart',
auto: true
isCheck: true,
}]});
@@ -53,4 +53,5 @@
trigger: ".o_website_edit_in_backend > a",
content: _t("Click here to customize your event further."),
position: "bottom",
isCheck: true,
}]);
@@ -29,5 +29,6 @@ registry.category("web_tour.tours").add('website_event_pages_seo', {
content: "Check that the page title is adapted, inside and outside the iframe",
trigger: 'html:has(title:containsExactText(Hello, world!))',
extra_trigger: 'iframe html:has(title:containsExactText(Hello, world!))',
isCheck: true,
},
]});
@@ -60,4 +60,9 @@
trigger: ".o_wforum_validate_toggler[data-karma]:first",
content: _t("Click here to accept this answer."),
position: "right",
}, {
content: "Check edit button is there",
trigger: "a:contains('Edit your answer')",
auto: true,
isCheck: true,
}]);
@@ -32,6 +32,7 @@
}, {
content: "Check the form is submitted without errors",
trigger: "#jobs_thankyou h1:contains('Congratulations')",
isCheck: true,
}];
}
@@ -50,6 +50,7 @@ export const start = [
content: "Is your message correctly sent ?",
trigger: "body.no_duplicated_message",
shadow_dom: false,
isCheck: true,
},
];
@@ -79,6 +80,7 @@ export const feedback = [
{
content: "Thanks for your feedback",
trigger: "p:contains('Thank you for your feedback')",
isCheck: true,
},
];
@@ -118,6 +120,7 @@ export const close = [
content: "Is the Test succeded ?",
trigger: "body.tour_success",
shadow_dom: false,
isCheck: true,
},
];
@@ -39,6 +39,7 @@ const chatRequest = [
content: "Is your message correctly sent ?",
shadow_dom: false,
trigger: "body.no_duplicated_message",
isCheck: true,
},
];
@@ -57,6 +57,7 @@ registry.category("web_tour.tours").add("website_livechat_login_after_chat_start
content:
"Livechat button is present since the old livechat session was linked to the public user, not the current user.",
trigger: ".o-livechat-LivechatButton",
isCheck: true,
},
],
});
@@ -98,6 +99,7 @@ registry.category("web_tour.tours").add("website_livechat_logout_after_chat_star
content:
"Livechat button is present since the old livechat session was linked to the logged user, not the public one.",
trigger: ".o-livechat-LivechatButton",
isCheck: true,
},
],
});
@@ -75,5 +75,6 @@ wTourUtils.registerWebsitePreviewTour('snippet_newsletter_block_with_edit', {
{
content: 'Check that the link style is correct',
trigger: 'iframe .s_newsletter_block .js_subscribed_btn.btn.btn-custom.flat:not(.btn-success)',
isCheck: true,
},
]);
@@ -158,6 +158,7 @@ function payWithTransfer(redirect=false) {
content: "Last step",
trigger: '.oe_website_sale_tx_status:contains("Please use the following transfer details")',
timeout: 30000,
isCheck: true,
}]
} else {
return [
@@ -366,4 +366,9 @@
content: "Pay Now",
extra_trigger: '#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))',
trigger: 'button[name="o_payment_submit_button"]:visible',
},
{
content: "Check payment status confirmation window",
trigger: ".oe_website_sale_tx_status[data-order-tracking-info]",
isCheck: true,
}]});
@@ -62,6 +62,7 @@ registry.category("web_tour.tours").add('website_sale_reorder_from_portal', {
{
content: "Check that quantity is 1",
trigger: ".js_quantity[value='1']",
isCheck: true,
},
]
});
@@ -30,5 +30,6 @@ registry.category("web_tour.tours").add('tour_shop_dynamic_variants', {
{
content: "check the variant is in the cart",
trigger: 'td.td-product_name:contains(Dynamic Product (Dynamic Value 2))',
isCheck: true,
},
]});
@@ -17,4 +17,8 @@ wTourUtils.registerWebsitePreviewTour("shop_editor", {
trigger: "iframe div.o_pricelist_dropdown a[data-bs-toggle=dropdown]",
extra_trigger: "iframe div.o_pricelist_dropdown a[data-bs-toggle=dropdown][aria-expanded=false]",
content: "Click on the pricelist again.",
}, {
trigger: "iframe div.o_pricelist_dropdown a[data-bs-toggle=dropdown][aria-expanded=true]",
content: "Check pricelist dropdown opened",
isCheck: true,
}]);
@@ -73,5 +73,6 @@ registry.category("web_tour.tours").add('shop_mail', {
{
content: "wait mail to be sent, and go see it",
trigger: '.o-mail-Message-body:contains("Your"):contains("order")',
isCheck: true,
},
]});
@@ -40,6 +40,7 @@ registry.category("web_tour.tours").add('onsite_payment_tour', {
{
content: 'Assert pay on site is NOT an option',
trigger: 'body:not(:contains("Test Payment Provider"))',
isCheck: true,
},
]
});
@@ -60,5 +60,6 @@
{
content: "Check never custom variant",
trigger: 'td.td-product_name:contains(Never attribute size custom: Yes never custom: TEST)',
isCheck: true,
}
]});
@@ -19,6 +19,7 @@ registry.category("web_tour.tours").add('website_sale_stock_reorder_from_portal'
{
content: "Check that there is one product that does not have enough stock",
trigger: "#o_wsale_reorder_body div.text-warning:contains('You ask for 2.0 Units but only 1.0 are available.')",
isCheck: true,
},
]
});
@@ -26,6 +26,7 @@ registry.category("web_tour.tours").add('back_in_stock_notification_product', {
{
content: "Success Message",
trigger: '#stock_notification_success_message',
isCheck: true,
},
],
});
@@ -22,6 +22,7 @@ registry.category("web_tour.tours").add('stock_notification_wishlist', {
{
content: "Success Message",
trigger: '#stock_notification_success_message',
isCheck: true,
},
],
});
@@ -161,6 +161,11 @@ const addImageToSection = (sectionName, pageName, backend) => {
{
content: 'eLearning: back to course',
trigger: `${prefix}.o_wslides_fs_sidebar_header a:contains("Déboulonnate")`,
},
{
content: 'eLearning: check course page',
trigger: `${prefix}.o_wslides_course_main`,
isCheck: true,
}];
};
@@ -214,6 +219,10 @@ const addPdfToSection = function (sectionName, pageName, backend) {
}, {
content: 'eLearning: back to course',
trigger: `${prefix}.o_wslides_fs_sidebar_header a:contains("Déboulonnate")`,
}, {
content: 'eLearning: check course page',
trigger: `${prefix}.o_wslides_course_main`,
isCheck: true,
}];
};
@@ -19,6 +19,7 @@ function checkLoginColumn(translation) {
}, {
content: `Login column should be ${translation}`,
trigger: `[data-name="login"] span:contains("${translation}")`,
isCheck: true,
}
]
}