KolushovAlexandr
6 years ago
No known key found for this signature in database
GPG Key ID: C3E04B793421FD2
6 changed files with 68 additions and 84 deletions
-
8mail_archives/README.rst
-
6mail_archives/__manifest__.py
-
4mail_archives/static/description/index.html
-
100mail_archives/static/src/js/archives.js
-
15mail_archives/static/src/xml/menu.xml
-
19mail_archives/tests/test_js.py
@ -1,17 +1,24 @@ |
|||
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_archives(self): |
|||
|
|||
# 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_archives')], limit=1).state = 'installed' |
|||
|
|||
# wait till page loaded and then click and wait again |
|||
code = """ |
|||
setTimeout(function () { |
|||
$(".mail_archives").click(); |
|||
setTimeout(function () {console.log('ok');}, 3000); |
|||
}, 1000); |
|||
console.log($(".mail_archives").length && 'ok' || 'error'); |
|||
}, 3000); |
|||
""" |
|||
link = '/web#action=%s' % self.ref('mail.mail_channel_action_client_chat') |
|||
self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_archives.archives']", login="admin") |
|||
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="admin") |
Write
Preview
Loading…
Cancel
Save
Reference in new issue