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.

63 lines
1.7 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
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?debug=',
  11. wait_for: base.ready()
  12. };
  13. var setps = [
  14. {
  15. content: 'open menu_administration',
  16. trigger: 'a[data-menu-xmlid="base.menu_administration"]',
  17. run: 'click',
  18. },{
  19. content: 'open menu_custom',
  20. trigger: 'a[data-menu-xmlid="base.menu_custom"]',
  21. run: 'click',
  22. },{
  23. content: 'open menu_action_attachment',
  24. trigger: 'a[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: 'switch to list view',
  38. trigger: '.o_cp_switch_list',
  39. extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
  40. run: 'click',
  41. },{
  42. content: 'open form view',
  43. trigger: 'td.o_data_cell:contains("sample.pdf")',
  44. extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
  45. run: 'click',
  46. },{
  47. content: 'open dialog',
  48. trigger: 'button.o_binary_preview',
  49. run: 'click',
  50. },{
  51. content: 'check',
  52. trigger: 'div.preview-body iframe',
  53. run: function (actions) {},
  54. }
  55. ];
  56. tour.register(name, options, setps);
  57. });