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.

30 lines
1.1 KiB

9 years ago
  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_res_partner_mails_to_count(self):
  6. # self.phantom_js('/', "openerp.Tour.run('mails_count_tour', 'test')", "openerp.Tour.tours.mails_count_tour", login="admin")
  7. self.phantom_js(
  8. "/",
  9. "odoo.__DEBUG__.services['web.Tour'].run('mails_count_tour', 'test')",
  10. "odoo.__DEBUG__.services['web.Tour'].tours.mails_count_tour",
  11. login="admin",
  12. )
  13. def test_02_res_partner_mails_from_count(self):
  14. # wait till page loaded and then click and wait again
  15. code = """
  16. setTimeout(function () {
  17. $(".mails_from").click();
  18. setTimeout(function () {console.log('ok');}, 3000);
  19. }, 3000);
  20. """
  21. link = "/web#id=3&view_type=form&model=res.partner"
  22. self.phantom_js(
  23. link,
  24. code,
  25. "odoo.__DEBUG__.services['web.Tour'].tours.mails_count_tour",
  26. login="admin",
  27. )