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.

25 lines
886 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2016-2017 Jairo Llopis <jairo.llopis@tecnativa.com>
  3. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
  4. from odoo.http import root
  5. from odoo.tests.common import HttpCase
  6. class UICase(HttpCase):
  7. def test_ui(self):
  8. """Test snippet behavior."""
  9. tour = "odoo.__DEBUG__.services['web_tour.tour'].%s"
  10. # Admin edits home page and adds subscription snippet
  11. self.phantom_js(
  12. "/",
  13. tour % "run('mass_mailing_name_editor')",
  14. tour % "tours.mass_mailing_name_editor.ready",
  15. login="admin")
  16. # Forced log out
  17. root.session_store.delete(self.session)
  18. # Public user uses subscription snippet
  19. self.phantom_js(
  20. "/",
  21. tour % "run('mass_mailing_name_public')",
  22. tour % "tours.mass_mailing_name_public.ready")