You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
708 B

  1. import odoo.tests
  2. @odoo.tests.common.at_install(False)
  3. @odoo.tests.common.post_install(True)
  4. class TestUi(odoo.tests.HttpCase):
  5. def test_01_mail_to(self):
  6. # checks the presence of an element with a link to the recipient
  7. # TODO: instead of timeout, try to put $('a.recipient_link') as ready argument of phantom_js (third parameter)
  8. code = """
  9. setTimeout(function () {
  10. $('a.recipient_link')[0].click();
  11. console.log('ok');
  12. }, 1000);
  13. """
  14. link = '/web#action=%s' % self.ref('mail.mail_channel_action_client_chat')
  15. self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_to.MailTo']", login="admin")