diff --git a/res_partner_mails_count/__openerp__.py b/res_partner_mails_count/__openerp__.py
index 9e86c59..8d66d84 100644
--- a/res_partner_mails_count/__openerp__.py
+++ b/res_partner_mails_count/__openerp__.py
@@ -15,6 +15,7 @@
"depends": [
'base',
'mail' ,
+ 'web_tour_extra' ,
],
"external_dependencies": {"python": [], "bin": []},
"data": [
diff --git a/res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js b/res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js
new file mode 100644
index 0000000..b64e84b
--- /dev/null
+++ b/res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js
@@ -0,0 +1,46 @@
+(function () {
+ 'use strict';
+
+ var _t = openerp._t;
+
+ openerp.Tour.register({
+ id: 'mails_count_tour',
+ name: _t("Mails count Tour"),
+ mode: 'test',
+ path: '/web?res_partner_mails_count=tutorial#id=3&view_type=form&model=res.partner',
+ // mode: 'tutorial',
+ steps: [
+ {
+ title: _t("Mails count tutorial"),
+ content: _t("Let's see how mails count work."),
+ popover: { next: _t("Start Tutorial"), end: _t("Skip") },
+ },
+ {
+ title: _t("New fields"),
+ content: _t("Here is new fields with mails counters. Press one of it."),
+ element: '.mails_to',
+
+ },
+ {
+ 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 'Send a mesage'."),
+ 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",
+ content: _t("Enjoy your day!
IT-Projects LLC team "),
+ popover: { next: _t("Close Tutorial") },
+ },
+ ]
+ });
+
+}());
diff --git a/res_partner_mails_count/templates.xml b/res_partner_mails_count/templates.xml
index 936ba1c..0541d56 100644
--- a/res_partner_mails_count/templates.xml
+++ b/res_partner_mails_count/templates.xml
@@ -7,6 +7,8 @@
+
@@ -29,13 +31,13 @@
-
-
+
+ res_partner_mails_count Tutorial
+
+ self
+
+
diff --git a/res_partner_mails_count/tests/__init__.py b/res_partner_mails_count/tests/__init__.py
index 300df16..e5b223e 100644
--- a/res_partner_mails_count/tests/__init__.py
+++ b/res_partner_mails_count/tests/__init__.py
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from . import test_mail
+from . import test_phantom
diff --git a/res_partner_mails_count/tests/test_phantom.py b/res_partner_mails_count/tests/test_phantom.py
new file mode 100644
index 0000000..515d55b
--- /dev/null
+++ b/res_partner_mails_count/tests/test_phantom.py
@@ -0,0 +1,18 @@
+import openerp.tests
+
+@openerp.tests.common.at_install(False)
+@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")
+
+ def test_02_res_partner_mails_from_count(self):
+ # wait till page loaded and then click and wait again
+ code = """
+ setTimeout(function () {
+ $(".mails_from").click();
+ setTimeout(function () {console.log('ok');}, 3000);
+ }, 3000);
+ """
+ link = '/web#id=3&view_type=form&model=res.partner'
+ self.phantom_js(link, code, "openerp.Tour.tours.mails_count_tour", login="admin")