From c8ffe6260eaabd5280f955be5ecadd60fffce606 Mon Sep 17 00:00:00 2001 From: Ilyas Date: Fri, 8 Apr 2016 16:47:40 +0500 Subject: [PATCH] [IMP] phantom test of mails_from click. --- .../static/src/js/res_partner_mails_count_tour.js | 2 +- res_partner_mails_count/tests/test_phantom.py | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) 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 index 3cf18e3..b64e84b 100644 --- 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 @@ -7,7 +7,7 @@ id: 'mails_count_tour', name: _t("Mails count Tour"), mode: 'test', - path: '/web?debug=1&res_partner_mails_count=tutorial#id=3&view_type=form&model=res.partner', + path: '/web?res_partner_mails_count=tutorial#id=3&view_type=form&model=res.partner', // mode: 'tutorial', steps: [ { diff --git a/res_partner_mails_count/tests/test_phantom.py b/res_partner_mails_count/tests/test_phantom.py index e36357d..515d55b 100644 --- a/res_partner_mails_count/tests/test_phantom.py +++ b/res_partner_mails_count/tests/test_phantom.py @@ -3,6 +3,16 @@ 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_count(self): - link = "/web?debug=1&res_partner_mails_count=tutorial#id=3&view_type=form&model=res.partner&/#tutorial_extra.mails_count_tour=true" + 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")