Browse Source

[PORT] tour

pull/5/head
Ilyas 9 years ago
parent
commit
69c2a10b6b
  1. 2
      res_partner_mails_count/__openerp__.py
  2. 28
      res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js
  3. 7
      res_partner_mails_count/templates.xml
  4. 3
      res_partner_mails_count/tests/test_phantom.py

2
res_partner_mails_count/__openerp__.py

@ -13,7 +13,7 @@
"currency": "EUR",
"depends": [
'mail_archives'
'mail_archives',
'web_tour_extra' ,
],
"external_dependencies": {"python": [], "bin": []},

28
res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js

@ -1,9 +1,10 @@
(function () {
odoo.define('res_partner_mails_count.mails_count_tour', function (require) {
'use strict';
var Core = require('web.core');
var Tour = require('web.Tour');
var _t = Core._t;
var _t = openerp._t;
openerp.Tour.register({
Tour.register({
id: 'mails_count_tour',
name: _t("Mails count Tour"),
mode: 'test',
@ -22,25 +23,12 @@
},
{
waitNot: '.mails_to:visible',
title: _t("Send message from here"),
placement: 'left',
content: _t("Now you can see corresponding mails. You can send mail to this partner right from here. Press <em>'Send a mesage'</em>."),
element: '.oe_mail_wall .oe_msg.oe_msg_composer_compact>div>.oe_compose_post',
},
{
title: "New message",
placement: 'left',
content: _t("You can type message here."),
element: 'div.oe_msg_content>textarea.field_text',
},
{
wait: '7000',
title: "That's it",
waitFor: '.o_channel_name.mail_archives:visible',
title: _t("That's it"),
content: _t("Enjoy your day! <br/> <br/><a href='https://www.it-projects.info/apps' target='_blank'>IT-Projects LLC</a> team "),
popover: { next: _t("Close Tutorial") },
},
]
});
}());
});

7
res_partner_mails_count/templates.xml

@ -1,6 +1,13 @@
<?xml version="1.0"?>
<openerp>
<data>
<template id="res_partner_mails_count_assets_backend"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script src="/res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js"
type="text/javascript"></script>
</xpath>
</template>
<record id="view_res_partner_mails_count_info_form" model="ir.ui.view">
<field name="name">res.partner.mails.count</field>
<field name="model">res.partner</field>

3
res_partner_mails_count/tests/test_phantom.py

@ -4,7 +4,8 @@ import openerp.tests
@openerp.tests.common.post_install(True)
class TestUi(openerp.tests.HttpCase):
def test_01_res_partner_mails_to_count(self):
self.phantom_js('/', "openerp.Tour.run('mails_count_tour', 'test')", "openerp.Tour.tours.mails_count_tour", login="admin")
# self.phantom_js('/', "openerp.Tour.run('mails_count_tour', 'test')", "openerp.Tour.tours.mails_count_tour", login="admin")
self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('mails_count_tour', 'test')","odoo.__DEBUG__.services['web.Tour'].tours.mails_count_tour", login="admin")
def test_02_res_partner_mails_from_count(self):
# wait till page loaded and then click and wait again

Loading…
Cancel
Save