From 128a7de1ed70c1a7f2c3cad7b4ac252bb372a315 Mon Sep 17 00:00:00 2001 From: KolushovAlexandr Date: Wed, 23 Jan 2019 13:59:23 +0500 Subject: [PATCH] :shield: mail_private tests --- mail_private/static/src/js/test_private.js | 4 ++-- mail_private/tests/test_js.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mail_private/static/src/js/test_private.js b/mail_private/static/src/js/test_private.js index 876536d..4b6efda 100644 --- a/mail_private/static/src/js/test_private.js +++ b/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 + ")", diff --git a/mail_private/tests/test_js.py b/mail_private/tests/test_js.py index b7dc70e..88e0f73 100644 --- a/mail_private/tests/test_js.py +++ b/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)