[FIX] website: tour test inject javascript
[odoo/odoo.git] / addons / website_sale / tests / test_ui.py
1 import os
2
3 import openerp.tests
4
5 inject = [
6     os.path.join(os.path.dirname(__file__), '../../website/static/src/js/website.tour.js'),
7     os.path.join(os.path.dirname(__file__), "../static/src/js/website.tour.sale.js"),
8 ]
9
10 @openerp.tests.common.at_install(False)
11 @openerp.tests.common.post_install(True)
12 class TestUi(openerp.tests.HttpCase):
13     def test_01_admin_shop_tour(self):
14         self.phantom_js("/", "openerp.website.Tour.run('shop', 'test')", "openerp.website.Tour.tours.shop", login="admin")
15
16     def test_02_admin_checkout(self):
17         self.phantom_js("/", "openerp.website.Tour.run('shop_buy_product', 'test')", "openerp.website.Tour.tours.shop_buy_product", login="admin", inject=inject)
18
19     def test_03_demo_checkout(self):
20         self.phantom_js("/", "openerp.website.Tour.run('shop_buy_product', 'test')", "openerp.website.Tour.tours.shop_buy_product", login="demo", inject=inject)
21
22     def test_04_public_checkout(self):
23         self.phantom_js("/", "openerp.website.Tour.run('shop_buy_product', 'test')", "openerp.website.Tour.tours.shop_buy_product", inject=inject)