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.

31 lines
1.1 KiB

9 years ago
  1. # -*- coding: utf-8 -*-
  2. import odoo.tests
  3. @odoo.tests.common.at_install(False)
  4. @odoo.tests.common.post_install(True)
  5. class TestUi(odoo.tests.HttpCase):
  6. def test_01_res_partner_mails_to_count(self):
  7. # self.phantom_js('/', "openerp.Tour.run('mails_count_tour', 'test')", "openerp.Tour.tours.mails_count_tour", login="admin")
  8. self.phantom_js(
  9. "/",
  10. "odoo.__DEBUG__.services['web.Tour'].run('mails_count_tour', 'test')",
  11. "odoo.__DEBUG__.services['web.Tour'].tours.mails_count_tour",
  12. login="admin",
  13. )
  14. def test_02_res_partner_mails_from_count(self):
  15. # wait till page loaded and then click and wait again
  16. code = """
  17. setTimeout(function () {
  18. $(".mails_from").click();
  19. setTimeout(function () {console.log('ok');}, 3000);
  20. }, 3000);
  21. """
  22. link = "/web#id=3&view_type=form&model=res.partner"
  23. self.phantom_js(
  24. link,
  25. code,
  26. "odoo.__DEBUG__.services['web.Tour'].tours.mails_count_tour",
  27. login="admin",
  28. )