Browse Source

🛡️ mail_private tests

pull/176/head
KolushovAlexandr 6 years ago
parent
commit
128a7de1ed
No known key found for this signature in database GPG Key ID: C3E04B793421FD2
  1. 4
      mail_private/static/src/js/test_private.js
  2. 8
      mail_private/tests/test_js.py

4
mail_private/static/src/js/test_private.js

@ -24,7 +24,7 @@ odoo.define('mail_private.tour', function (require) {
trigger: "button.oe_composer_uncheck",
extra_trigger: "button.oe_composer_uncheck",
content: _t("Uncheck all Followers"),
timeout: 22000,
timeout: 10000,
}, {
trigger: "div.o_composer_suggested_partners input:first",
content: _t("Check the first one"),
@ -35,7 +35,7 @@ odoo.define('mail_private.tour', function (require) {
$('textarea.o_composer_text_field:first').val(email);
},
}, {
trigger: ".o_composer_buttons .o_composer_button_send",
trigger: ".o_composer_send .o_composer_button_send",
content: _t("Send email"),
}, {
trigger: ".o_mail_thread .o_thread_message:contains(" + email + ")",

8
mail_private/tests/test_js.py

@ -20,7 +20,13 @@ class TestUi(odoo.tests.HttpCase):
env['ir.module.module'].search([('name', '=', 'mail_private')], limit=1).state = 'installed'
cr.release()
env = Environment(self.registry.test_cr, self.uid, {})
partners = env['res.partner'].search([])
new_follower = env['res.partner'].search([('name', 'ilike', 'Ja')])
for partner in partners:
partner.message_subscribe(new_follower.ids, [])
self.phantom_js("/web",
"odoo.__DEBUG__.services['web_tour.tour'].run('mail_private_tour', 1000)",
"odoo.__DEBUG__.services['web_tour.tour'].tours.mail_private_tour.ready",
login="admin", timeout=70)
login="admin", timeout=90)
Loading…
Cancel
Save