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.

58 lines
1.5 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
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. content: 'open menu_administration',
  16. trigger: 'a.oe_menu_toggler[data-menu-xmlid="base.menu_administration"]',
  17. run: 'click',
  18. },{
  19. content: 'open next_id_9',
  20. trigger: 'a.oe_menu_toggler[data-menu-xmlid="base.next_id_9"]',
  21. run: 'click',
  22. },{
  23. content: 'open menu_action_attachment',
  24. trigger: 'a.oe_menu_leaf[data-menu-xmlid="base.menu_action_attachment"]',
  25. run: 'click',
  26. },{
  27. content: 'search sample.pdf',
  28. trigger: 'input.o_searchview_input',
  29. extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
  30. run: 'text sample.pdf',
  31. },{
  32. content: 'search sample.pdf',
  33. trigger: 'ul.o_searchview_autocomplete li a',
  34. extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
  35. run: 'click',
  36. },{
  37. content: 'open form view',
  38. trigger: 'td.o_data_cell:contains("sample.pdf")',
  39. extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
  40. run: 'click',
  41. },{
  42. content: 'open dialog',
  43. trigger: 'button.o_binary_preview',
  44. run: 'click',
  45. },{
  46. content: 'check',
  47. trigger: 'div.preview-body iframe',
  48. run: function (actions) {},
  49. }
  50. ];
  51. tour.register(name, options, setps);
  52. });