Browse Source
Merge pull request #39 from ilyasProgrammer/8_mail_count
Merge pull request #39 from ilyasProgrammer/8_mail_count
[ADD] phantom tour and testpull/3/head
Ivan Yelizariev
9 years ago
5 changed files with 80 additions and 2 deletions
-
1res_partner_mails_count/__openerp__.py
-
46res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js
-
16res_partner_mails_count/templates.xml
-
1res_partner_mails_count/tests/__init__.py
-
18res_partner_mails_count/tests/test_phantom.py
@ -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 <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", |
|||
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") }, |
|||
}, |
|||
] |
|||
}); |
|||
|
|||
}()); |
@ -1,3 +1,4 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import test_mail |
|||
from . import test_phantom |
@ -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") |
Write
Preview
Loading…
Cancel
Save
Reference in new issue