Mathias Markl 7 years ago
parent
commit
046f209f7e
  1. 8
      muk_web_preview/static/test/test.js
  2. 5
      muk_web_preview/template/assets.xml
  3. 2
      muk_web_preview/tests/test_preview.py

8
muk_web_preview/static/test/test.js

@ -17,30 +17,38 @@ var options = {
var setps = [
{
content: 'open menu_administration',
trigger: 'a.oe_menu_toggler[data-menu-xmlid="base.menu_administration"]',
run: 'click',
},{
content: 'open next_id_9',
trigger: 'a.oe_menu_toggler[data-menu-xmlid="base.next_id_9"]',
run: 'click',
},{
content: 'open menu_action_attachment',
trigger: 'a.oe_menu_leaf[data-menu-xmlid="base.menu_action_attachment"]',
run: 'click',
},{
content: 'search sample.pdf',
trigger: 'input.o_searchview_input',
extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
run: 'text sample.pdf',
},{
content: 'search sample.pdf',
trigger: 'ul.o_searchview_autocomplete li a',
extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
run: 'click',
},{
content: 'open form view',
trigger: 'td.o_data_cell:contains("sample.pdf")',
extra_trigger: 'div.o_main_content > div.o_control_panel li.active:contains("Attachment")',
run: 'click',
},{
content: 'open dialog',
trigger: 'button.o_binary_preview',
run: 'click',
},{
content: 'check',
trigger: 'div.preview-body iframe',
run: function (actions) {},
}

5
muk_web_preview/template/assets.xml

@ -29,11 +29,6 @@
<script type="text/javascript" src="/muk_web_preview/static/src/js/preview_generator.js"/>
<script type="text/javascript" src="/muk_web_preview/static/src/js/preview_widgets.js"/>
<script type="text/javascript" src="/muk_web_preview/static/src/js/preview_dialog.js"/>
</xpath>
</template>
<template id="assets_test" inherit_id="web.js_tests_assets">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/muk_web_preview/static/test/test.js"/>
</xpath>
</template>

2
muk_web_preview/tests/test_preview.py

@ -37,7 +37,7 @@ class PreviewTestCase(common.HttpCase):
def tearDown(self):
super(PreviewTestCase, self).tearDown()
@unittest.skip("skip")
def test_preview(self):
self.phantom_js("/web",

Loading…
Cancel
Save