You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.3 KiB

7 years ago
  1. odoo.define('muk_web_preview.tour', function (require) {
  2. 'use strict';
  3. var core = require("web.core");
  4. var tour = require("web_tour.tour");
  5. var base = require("web_editor.base");
  6. var _t = core._t;
  7. var name = 'preview';
  8. var options = {
  9. test: true,
  10. url: '/web',
  11. wait_for: base.ready()
  12. }
  13. var setps = [
  14. {
  15. trigger: 'a.oe_menu_toggler[data-menu-xmlid="base.menu_administration"]',
  16. run: 'click',
  17. },{
  18. trigger: 'a.oe_menu_toggler[data-menu-xmlid="base.next_id_9"]',
  19. run: 'click',
  20. },{
  21. trigger: 'a.oe_menu_leaf[data-menu-xmlid="base.menu_action_attachment"]',
  22. run: 'click',
  23. },{
  24. trigger: 'input.o_searchview_input',
  25. extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
  26. run: 'text sample.pdf',
  27. },{
  28. trigger: 'ul.o_searchview_autocomplete li a',
  29. extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
  30. run: 'click',
  31. },{
  32. trigger: 'td.o_data_cell:contains("sample.pdf")',
  33. extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
  34. run: 'click',
  35. },{
  36. trigger: 'button.o_binary_preview',
  37. run: 'click',
  38. },{
  39. trigger: 'div.preview-body iframe',
  40. run: function (actions) {},
  41. }
  42. ];
  43. tour.register(name, options, setps);
  44. });