[IMP] tests move test_ui from base to web

bzr revid: al@openerp.com-20140216225450-c92e6f63s8ic6drz
This commit is contained in:
Antony Lesuisse 2014-02-16 23:54:50 +01:00
commit 3c5f3bb04d
3 changed files with 19 additions and 2 deletions

View File

@ -1,8 +1,16 @@
# -*- coding: utf-8 -*-
import os
import openerp.tests
class TestUi(openerp.tests.HttpCase):
def test(self):
self.phantom_js("/", "console.log('ok')", "console")
def test_01_jsfile_ui_hello(self):
self.phantom_jsfile(os.path.join(os.path.dirname(__file__), 'test_ui_hello.js'))
def test_02_jsfile_ui_load(self):
self.phantom_jsfile(os.path.join(os.path.dirname(__file__), 'test_ui_load.js'))
def test_03_js_public(self):
self.phantom_js('/',"console.log('ok')","console")
def test_04_js_admin(self):
self.phantom_js('/',"console.log('ok')","openerp.client.action_manager.inner_widget.views.form", login='admin')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,5 @@
console.log("hello from test_phantom_hello.js");
console.log("ok");
// For a failure use:
//console.log("error");
phantom.exit();

View File

@ -0,0 +1,4 @@
// Load helper
phantom.injectJs(phantom.args[0]);
pt = new PhantomTest();
pt.run("/", "console.log('ok')", "console");