Skip to content
Permalink
Browse files

🛡 res_partner_skype: js tour

  • Loading branch information...
Ommo73 committed May 23, 2019
1 parent 51d0f66 commit 68959539f7c8054ce8cdb0034e7965f1e9e64c26
@@ -9,6 +9,9 @@
<xpath expr="." position="inside">
<script type="text/javascript" src="/res_partner_skype/static/src/js/skype.js"></script>
</xpath>
<xpath expr="." position="inside">
<script type="text/javascript" src="/res_partner_skype/static/src/js/test_res_partner_skype.js"></script>
</xpath>
</template>
</data>
</openerp>
@@ -0,0 +1,21 @@
odoo.define('res_partner_skype.tour', function (require) {
"use strict";

var tour = require("web_tour.tour");
var core = require('web.core');
var _t = core._t;


var steps = [{
trigger: '.o_thread_message strong.o_mail_redirect:contains("Agrolait")',
content: _t("Open Partners Form"),
position: 'bottom',
}, {
trigger: '.o_field_email.o_field_widget.o_form_uri.o_text_overflow[href="skype:test_skype?call"]',
content: _t("Check the link"),
position: 'bottom',
}];

tour.register('tour_res_partner_skype', { test: true, url: '/web?debug=assets#' }, steps);

});
@@ -0,0 +1,3 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from . import test_res_partner_skype
@@ -0,0 +1,25 @@
import odoo.tests
from odoo.api import Environment


@odoo.tests.common.at_install(True)
@odoo.tests.common.post_install(True)
class TestUi(odoo.tests.HttpCase):

def test_res_partner_skype(self):
# without a delay there might be problems on the steps whilst opening a POS
# caused by a not yet loaded button's action
cr = self.registry.cursor()
env = Environment(cr, self.uid, {})
env['ir.module.module'].search([('name', '=', 'res_partner_skype')], limit=1).state = 'installed'
cr.release()
env['res.partner'].search(([('id', '=', 9)]), limit = 1).write({
'skype': 'skype_test',
})

# without a delay there might be problems on the steps whilst opening a POS
# caused by a not yet loaded button's action
self.phantom_js("/web",
"odoo.__DEBUG__.services['web_tour.tour'].run('tour_res_partner_skype', 1000)",
"odoo.__DEBUG__.services['web_tour.tour'].tours.tour_res_partner_skype.ready",
login="admin", timeout=140)

0 comments on commit 6895953

Please sign in to comment.
You can’t perform that action at this time.