diff --git a/document_page_portal/static/src/js/document_page_portal_tour.js b/document_page_portal/static/src/js/document_page_portal_tour.js index 9865bfc50c0..20b6cdee58f 100644 --- a/document_page_portal/static/src/js/document_page_portal_tour.js +++ b/document_page_portal/static/src/js/document_page_portal_tour.js @@ -1,45 +1,44 @@ -odoo.define("document_page_portal.tour", function (require) { - "use strict"; +/** @odoo-module **/ +import { _t } from 'web.core'; +import { Markup } from 'web.utils'; +import tour from 'web_tour.tour'; - var tour = require("web_tour.tour"); - - tour.register( - "document_page_portal_tour", +tour.register( + "document_page_portal_tour", + { + test: true, + url: "/my", + }, + [ + { + content: "Check document_page_portal is loaded", + trigger: + 'a[href*="/my/knowledge/documents"]:contains("Knowledge Documents"):first', + }, { - test: true, - url: "/my", + content: "Check public document_page is loaded", + trigger: + 'a[href*="/knowledge/document/"]:contains("Test Public Page 1"):first', }, - [ - { - content: "Check document_page_portal is loaded", - trigger: - 'a[href*="/my/knowledge/documents"]:contains("Knowledge Documents"):first', - }, - { - content: "Check public document_page is loaded", - trigger: - 'a[href*="/knowledge/document/"]:contains("Test Public Page 1"):first', - }, - ] - ); + ] +); - tour.register( - "document_page_portal_search_tour", +tour.register( + "document_page_portal_search_tour", + { + test: true, + url: "/my/knowledge/documents", + }, + [ + { + content: "Search", + trigger: "input[name='search']", + run: "text Test", + }, { - test: true, - url: "/my/knowledge/documents", + content: "Click Search.", + extra_trigger: "#wrap:not(:has(input[name=search]:propValue('')))", + trigger: ".search-submit", }, - [ - { - content: "Search", - trigger: "input[name='search']", - run: "text Test", - }, - { - content: "Click Search.", - extra_trigger: "#wrap:not(:has(input[name=search]:propValue('')))", - trigger: ".search-submit", - }, - ] - ); -}); + ] +);