| 1 |
import { _t } from "@web/core/l10n/translation"; |
| 2 |
import { |
| 3 |
goBackToBlocks, |
| 4 |
insertSnippet, |
| 5 |
registerWebsitePreviewTour, |
| 6 |
} from '@website/js/tours/tour_utils'; |
| 7 |
|
| 8 |
import { markup } from "@odoo/owl"; |
| 9 |
|
| 10 |
registerWebsitePreviewTour("test_01_admin_shop_tour", { |
| 11 |
url: '/shop', |
| 12 |
}, |
| 13 |
() => [ |
| 14 |
{ |
| 15 |
trigger: ":iframe .js_sale", |
| 16 |
}, |
| 17 |
{ |
| 18 |
trigger: ".o_menu_systray .o_new_content_container > button", |
| 19 |
content: _t("Let's create your first product."), |
| 20 |
tooltipPosition: "bottom", |
| 21 |
run: "click", |
| 22 |
}, { |
| 23 |
trigger: "button[data-module-xml-id='base.module_website_sale']", |
| 24 |
content: markup(_t("Select <b>New Product</b> to create it and manage its properties to boost your sales.")), |
| 25 |
tooltipPosition: "bottom", |
| 26 |
run: "click", |
| 27 |
}, { |
| 28 |
trigger: ".modal-dialog input[type=text]", |
| 29 |
content: _t("Enter a name for your new product"), |
| 30 |
tooltipPosition: "left", |
| 31 |
run: "edit Test", |
| 32 |
}, { |
| 33 |
trigger: ".modal-footer button.btn-primary", |
| 34 |
content: markup(_t("Click on <em>Save</em> to create the product.")), |
| 35 |
tooltipPosition: "right", |
| 36 |
run: "click", |
| 37 |
}, |
| 38 |
{ |
| 39 |
trigger: ".o_builder_sidebar_open", |
| 40 |
}, |
| 41 |
{ |
| 42 |
trigger: ":iframe .product_price .oe_currency_value:visible", |
| 43 |
content: _t("Edit the price of this product by clicking on the amount."), |
| 44 |
tooltipPosition: "bottom", |
| 45 |
run: "editor 1.99", |
| 46 |
timeout: 30000, |
| 47 |
}, |
| 48 |
{ |
| 49 |
trigger: ":iframe .product_price .o_dirty .oe_currency_value:not(:text(1.00))", |
| 50 |
}, |
| 51 |
{ |
| 52 |
trigger: ":iframe #wrap img.product_detail_img", |
| 53 |
content: _t("Double click here to set an image describing your product."), |
| 54 |
tooltipPosition: "top", |
| 55 |
run: "dblclick", |
| 56 |
}, { |
| 57 |
isActive: ["auto"], |
| 58 |
trigger: ".o_select_media_dialog .o_upload_media_button", |
| 59 |
content: _t("Upload a file from your local library."), |
| 60 |
tooltipPosition: "bottom", |
| 61 |
run: "click .modal-footer .btn-secondary", |
| 62 |
}, |
| 63 |
goBackToBlocks(), |
| 64 |
{ |
| 65 |
trigger: "body:not(.modal-open)", |
| 66 |
}, |
| 67 |
...insertSnippet({ |
| 68 |
id: "s_text_image", |
| 69 |
name: "Text - Image", |
| 70 |
groupName: "Content", |
| 71 |
}), { |
| 72 |
|
| 73 |
|
| 74 |
trigger: ".o-snippets-top-actions button.fa-undo:not([disabled])", |
| 75 |
}, { |
| 76 |
trigger: "button[data-action=save]", |
| 77 |
content: markup(_t("Once you click on <b>Save</b>, your product is updated.")), |
| 78 |
tooltipPosition: "bottom", |
| 79 |
run: "click", |
| 80 |
}, |
| 81 |
{ |
| 82 |
trigger: ":iframe body:not(.editor_enable)", |
| 83 |
}, |
| 84 |
{ |
| 85 |
trigger: ".o_menu_systray_item.o_website_publish_container a", |
| 86 |
content: _t("Click on this button so your customers can see it."), |
| 87 |
tooltipPosition: "bottom", |
| 88 |
run: "click", |
| 89 |
}, { |
| 90 |
trigger: "button[data-menu-xmlid='website.menu_reporting']", |
| 91 |
content: _t("Click here to open the reporting menu"), |
| 92 |
tooltipPosition: "bottom", |
| 93 |
run: "click", |
| 94 |
}, { |
| 95 |
trigger: "a[data-menu-xmlid='website.menu_website_dashboard'], a[data-menu-xmlid='website.menu_website_analytics']", |
| 96 |
content: _t("Let's now take a look at your eCommerce dashboard to get your eCommerce website ready in no time."), |
| 97 |
tooltipPosition: "bottom", |
| 98 |
|
| 99 |
}]); |