/** @odoo-module **/ import { registry } from "@web/core/registry"; /** * This tour test that a log note isn't considered * as a course review. And also that a member can * add only one review. */ registry.category("web_tour.tours").add("course_reviews", { url: "/slides", steps: () => [ { trigger: "a:contains(Basics of Gardening - Test)", run: "click", }, { trigger: "a[id=review-tab]", run: "click", }, { trigger: "#chatterRoot:shadow .o-mail-Chatter-content:not(:has(.o-mail-Message-content))", }, { // If it fails here, it means the log note is considered as a review trigger: "span:contains(Add Review)", run: "click", }, { trigger: ".modal div.o_portal_chatter_composer_body textarea", run: "edit Great course!", }, { trigger: ".modal button.o_portal_chatter_composer_btn", run: "click", }, { trigger: "a[id=review-tab]", run: "click", }, { // If it fails here, it means the system is allowing you to add another review. trigger: "span:contains(Edit Review)", run: "click", }, { trigger: "div.o_portal_chatter_composer_body textarea:value(Great course!)", }, ], });