[FIX] test ui should use /login route for auto login
authorFabien Meghazi <fme@openerp.com>
Wed, 15 Jan 2014 16:13:18 +0000 (17:13 +0100)
committerFabien Meghazi <fme@openerp.com>
Wed, 15 Jan 2014 16:13:18 +0000 (17:13 +0100)
bzr revid: fme@openerp.com-20140115161318-v8ksw0u0u1mpgn0x

addons/website/tests/test_ui.py
addons/website/tests/ui_suite/ui_test_runner.js
addons/website_blog/tests/test_ui.py
addons/website_event/tests/test_ui.py

index 75a9886..ffd5e73 100644 (file)
@@ -146,6 +146,6 @@ def full_path(filename):
 
 def load_tests(loader, base, _):
     base.addTest(WebsiteUiSuite(full_path('dummy_test.js'), {}, 5.0))
-    base.addTest(WebsiteUiSuite(full_path('simple_dom_test.js'), { 'action': 'website.action_website_homepage' }, 60.0))
-    base.addTest(WebsiteUiSuite(full_path('homepage_test.js'),   { 'action': 'website.action_website_homepage' }, 60.0))
+    base.addTest(WebsiteUiSuite(full_path('simple_dom_test.js'), {'redirect': '/page/website.homepage'}, 60.0))
+    base.addTest(WebsiteUiSuite(full_path('homepage_test.js'), {'redirect': '/page/website.homepage'}, 60.0))
     return base
index ea8e03b..acb67d3 100644 (file)
@@ -27,15 +27,16 @@ function run (test) {
     var scheme = options.scheme ? options.scheme+'://' : 'http://';
     var host = options.host ? options.host : 'localhost';
     var port = options.port ? ':'+options.port : '';
-    var path = options.path ? options.path : '/web';
+    var path = options.path ? options.path : '/login';
 
     var queryParams = [];
     if (options.db) queryParams.push('db='+options.db);
+    if (options.user) queryParams.push('login='+options.user);
+    if (options.password) queryParams.push('key='+options.password);
+    if (options.redirect) queryParams.push('redirect='+options.redirect);
     var query = queryParams.length > 0 ? '?'+queryParams.join('&') : '';
 
     var hashParams = [];
-    if (options.user) hashParams.push('login='+options.user);
-    if (options.password) hashParams.push('password='+options.password);
     if (options.action) hashParams.push('action='+options.action);
     var hash = hashParams.length > 0 ? '#'+hashParams.join('&') : '';
 
index 0e57f94..f31b437 100644 (file)
@@ -6,5 +6,5 @@ def full_path(filename):
     return os.path.join(os.path.join(os.path.dirname(__file__), 'ui_suite'), filename)
 
 def load_tests(loader, base, _):
-    base.addTest(test_ui.WebsiteUiSuite(full_path('post_test.js'),   { 'action': 'website.action_website_homepage' }, 60.0))
-    return base
\ No newline at end of file
+    base.addTest(test_ui.WebsiteUiSuite(full_path('post_test.js'), {'redirect': '/page/website.homepage'}, 60.0))
+    return base
index 8c4bdb2..eaf16cc 100644 (file)
@@ -6,5 +6,5 @@ def full_path(filename):
     return os.path.join(os.path.join(os.path.dirname(__file__), 'ui_suite'), filename)
 
 def load_tests(loader, base, _):
-    base.addTest(test_ui.WebsiteUiSuite(full_path('event_test.js'),   { 'action': 'website.action_website_homepage' }, 60.0))
-    return base
\ No newline at end of file
+    base.addTest(test_ui.WebsiteUiSuite(full_path('event_test.js'), {'redirect': '/page/website.homepage'}, 60.0))
+    return base