/** @odoo-module */ import { TourError } from "@web_tour/tour_service/tour_utils"; import wTourUtils from '@website/js/tours/tour_utils'; wTourUtils.registerWebsitePreviewTour("website_media_dialog_undraw", { test: true, url: '/', edition: true, }, () => [ wTourUtils.dragNDrop({ id: 's_text_image', name: 'Text - Image', }), { content: "Open the media dialog from the snippet", trigger: "iframe .s_text_image img", run: "dblclick", }, { content: "Search for 'banner' to call the media library", // Mocked call trigger: ".o_select_media_dialog .o_we_search", run: "text banner", }, { content: "Check that the media library is available", trigger: '.o_select_media_dialog:has(.o_we_search_select option[value="media-library"])', run: () => null, // it's a check }, ]); wTourUtils.registerWebsitePreviewTour("website_media_dialog_external_library", { test: true, url: "/", edition: true, }, () => [ wTourUtils.dragNDrop({ id: "s_text_image", name: "Text - Image", }), { content: "Open the media dialog from the snippet", trigger: "iframe .s_text_image img", run: "dblclick", }, { content: "Dummy search to call the media library", trigger: ".o_select_media_dialog .o_we_search", run: "text a", }, { content: "Choose the media library to only show its media", trigger: ".o_select_media_dialog .o_we_search_select", // This is a standard