test_js.py 772 B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo.tests import tagged, HttpCase
  4. @tagged("post_install", "-at_install")
  5. class WebSuite(HttpCase):
  6. def setUp(self):
  7. super().setUp()
  8. env = self.env(user=self.env.ref('base.user_admin'))
  9. self.main_pos_config = self.main_pos_config = env['pos.config'].create({
  10. 'name': 'Shop',
  11. })
  12. def test_pos_js(self):
  13. # open a session, the /pos/ui controller will redirect to it
  14. self.main_pos_config.open_ui()
  15. self.main_pos_config.current_session_id.set_cashbox_pos(0, None)
  16. # point_of_sale desktop test suite
  17. self.browser_js("/pos/ui/tests?mod=web", "", "", login="admin", timeout=1800)