[FIX] website_sale,website_event: can't create product and event. Why: controller...
[odoo/odoo.git] / addons / website_sale / tests / test_ui.py
1 import os
2
3 import unittest2
4
5 import openerp.tests
6
7 inject = [
8     ("openerp.website.Tour", os.path.join(os.path.dirname(__file__), '../../website/static/src/js/website.tour.js')),
9     ("openerp.website.Tour.ShopTest", os.path.join(os.path.dirname(__file__), "../static/src/js/website.tour.sale.js")),
10 ]
11
12 class TestUi(openerp.tests.HttpCase):
13     def test_01_admin_shop_tour(self):
14         self.phantom_js("/", "openerp.website.Tour.run_test('shop')", "openerp.website.Tour.Shop", login="admin")
15
16     def test_02_admin_checkout(self):
17         self.phantom_js("/", "openerp.website.Tour.run_test('shop_buy_product')", "openerp.website.Tour", login="admin")
18
19     def test_03_demo_checkout(self):
20         self.phantom_js("/", "openerp.website.Tour.run_test('shop_buy_product')", "openerp.website.Tour.ShopTest", login="demo", inject=inject)
21
22     @unittest2.expectedFailure
23     def test_04_public_checkout(self):
24         self.phantom_js("/", "openerp.website.Tour.run_test('shop_buy_product')", "openerp.website.Tour.ShopTest", inject=inject)