KolushovAlexandr
6 years ago
No known key found for this signature in database
GPG Key ID: C3E04B793421FD2
6 changed files with 62 additions and 74 deletions
-
8mail_sent/README.rst
-
6mail_sent/__manifest__.py
-
4mail_sent/static/description/index.html
-
91mail_sent/static/src/js/sent.js
-
11mail_sent/static/src/xml/menu.xml
-
14mail_sent/tests/test_js.py
@ -1,17 +1,25 @@ |
|||
import odoo.tests |
|||
from werkzeug import url_encode |
|||
|
|||
|
|||
@odoo.tests.common.at_install(False) |
|||
@odoo.tests.common.at_install(True) |
|||
@odoo.tests.common.post_install(True) |
|||
class TestUi(odoo.tests.HttpCase): |
|||
|
|||
def test_01_mail_sent(self): |
|||
# wait till page loaded and then click and wait again |
|||
|
|||
# needed because tests are run before the module is marked as |
|||
# installed. In js web will only load qweb coming from modules |
|||
# that are returned by the backend in module_boot. Without |
|||
# this you end up with js, css but no qweb. |
|||
self.env['ir.module.module'].search([('name', '=', 'mail_sent')], limit=1).state = 'installed' |
|||
|
|||
code = """ |
|||
setTimeout(function () { |
|||
$(".mail_sent").click(); |
|||
setTimeout(function () {console.log('ok');}, 3000); |
|||
}, 1000); |
|||
""" |
|||
link = '/web#action=%s' % self.ref('mail.mail_channel_action_client_chat') |
|||
self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_sent.sent'].is_ready", login="demo") |
|||
link = '/web#%s' % url_encode({'action': 'mail.action_discuss'}) |
|||
self.phantom_js(link, code, "odoo.__DEBUG__.services['web_tour.tour'].tours.mail_tour.ready", login="demo") |
Write
Preview
Loading…
Cancel
Save
Reference in new issue