|
@ -6,17 +6,19 @@ |
|
|
import odoo.tests |
|
|
import odoo.tests |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@odoo.tests.common.at_install(False) |
|
|
|
|
|
|
|
|
@odoo.tests.common.at_install(True) |
|
|
@odoo.tests.common.post_install(True) |
|
|
@odoo.tests.common.post_install(True) |
|
|
class TestUi(odoo.tests.HttpCase): |
|
|
class TestUi(odoo.tests.HttpCase): |
|
|
|
|
|
|
|
|
def test_01_mail_all(self): |
|
|
def test_01_mail_all(self): |
|
|
# wait till page loaded and then click and wait again |
|
|
|
|
|
code = """ |
|
|
|
|
|
setTimeout(function () { |
|
|
|
|
|
$(".mail_all").click(); |
|
|
|
|
|
setTimeout(function () {console.log('ok');}, 3000); |
|
|
|
|
|
}, 1000); |
|
|
|
|
|
""" |
|
|
|
|
|
|
|
|
# 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_all')], limit=1).state = 'installed' |
|
|
|
|
|
|
|
|
link = '/web#action=%s' % self.ref('mail.action_discuss') |
|
|
link = '/web#action=%s' % self.ref('mail.action_discuss') |
|
|
self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_all.all']", login="admin") |
|
|
|
|
|
|
|
|
self.phantom_js(link, |
|
|
|
|
|
"odoo.__DEBUG__.services['web_tour.tour'].run('tour_mail_all', 1000)", |
|
|
|
|
|
"odoo.__DEBUG__.services['web_tour.tour'].tours.tour_mail_all.ready", |
|
|
|
|
|
login="admin") |