40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
import { registry } from "@web/core/registry";
|
|
import { stepUtils } from "@web_tour/tour_utils";
|
|
import { browser } from "@web/core/browser/browser";
|
|
|
|
registry.category("web_tour.tours").add('appointment_crm_meeting_tour', {
|
|
url: '/odoo',
|
|
steps: () => [stepUtils.showAppsMenuItem(), {
|
|
trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]',
|
|
run: 'click',
|
|
},
|
|
{
|
|
trigger: ".o_opportunity_kanban",
|
|
},
|
|
{
|
|
trigger: '.o_kanban_record:contains("Test Opportunity")',
|
|
run: 'click',
|
|
}, {
|
|
trigger: 'button[name="action_schedule_meeting"]',
|
|
run: 'click',
|
|
}, {
|
|
trigger: 'button.dropdownAppointmentLink',
|
|
run: 'click',
|
|
}, {
|
|
trigger: '.o_appointment_button_link:contains("Test AppointmentCRM")',
|
|
async run(helpers) {
|
|
// Patch and ignore write on clipboard in tour as we don't have permissions
|
|
const { writeText } = browser.navigator.clipboard;
|
|
browser.navigator.clipboard.writeText = () => {
|
|
console.info('Copy in clipboard ignored!');
|
|
// Cleanup the patched clipboard method
|
|
browser.navigator.clipboard.writeText = writeText;
|
|
};
|
|
await helpers.click();
|
|
},
|
|
}, {
|
|
trigger: '.o_appointment_discard_slots',
|
|
run: 'click',
|
|
}],
|
|
});
|