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.

24 lines
986 B

  1. import odoo.tests
  2. from werkzeug import url_encode
  3. @odoo.tests.common.at_install(True)
  4. @odoo.tests.common.post_install(True)
  5. class TestUi(odoo.tests.HttpCase):
  6. def test_01_mail_archives(self):
  7. # needed because tests are run before the module is marked as
  8. # installed. In js web will only load qweb coming from modules
  9. # that are returned by the backend in module_boot. Without
  10. # this you end up with js, css but no qweb.
  11. self.env['ir.module.module'].search([('name', '=', 'mail_archives')], limit=1).state = 'installed'
  12. # wait till page loaded and then click and wait again
  13. code = """
  14. setTimeout(function () {
  15. console.log($(".mail_archives").length && 'ok' || 'error');
  16. }, 3000);
  17. """
  18. link = '/web#%s' % url_encode({'action': 'mail.action_discuss'})
  19. self.phantom_js(link, code, "odoo.__DEBUG__.services['web_tour.tour'].tours.mail_tour.ready", login="admin")