Files
odoo_source/addons/website/static/tests/tours/grid_layout.js
T
divy-odoo c6f8f78115 [FIX] website_*: replace manual tour with utils
In this PR,
Replace the manual tour steps with existing tour utils.

task-3279232

closes odoo/odoo#129317

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-08-25 13:58:34 +02:00

45 lines
1.2 KiB
JavaScript

/** @odoo-module **/
import wTourUtils from '@website/js/tours/tour_utils';
const snippet = {
id: 's_text_image',
name: 'Text - Image',
};
wTourUtils.registerWebsitePreviewTour('website_replace_grid_image', {
test: true,
url: '/',
edition: true,
}, () => [
wTourUtils.dragNDrop(snippet),
wTourUtils.clickOnSnippet(snippet),
{
content: "Toggle to grid mode",
trigger: '.o_we_user_value_widget[data-name="grid_mode"]',
},
{
content: "Replace image",
trigger: 'iframe .s_text_image img',
run: 'dblclick',
},
{
content: "Pick new image",
trigger: '.o_select_media_dialog img[title="s_banner_default_image.jpg"]',
},
{
content: "Add new image column",
trigger: '.o_we_user_value_widget[data-add-element="image"]',
},
{
content: "Replace new image",
trigger: 'iframe .s_text_image img[src="/web/image/website.s_text_image_default_image"]',
run: 'dblclick',
},
{
content: "Pick new image",
trigger: '.o_select_media_dialog img[title="s_banner_default_image.jpg"]',
},
...wTourUtils.clickOnSave()
]);