summaryrefslogtreecommitdiffstats
path: root/install/static/webui.js
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2010-09-24 19:50:29 -0400
committerAdam Young <ayoung@redhat.com>2010-09-24 19:50:29 -0400
commit346615d4a0029fb3f59344a98963b7fea8356b8c (patch)
treef038a31261d2560d703daee0f2f190049ebfac23 /install/static/webui.js
parent59d46abcd5fe9b5e83d4ae962a3afe8bf6bd8e87 (diff)
downloadfreeipa-346615d4a0029fb3f59344a98963b7fea8356b8c.tar.gz
freeipa-346615d4a0029fb3f59344a98963b7fea8356b8c.tar.xz
freeipa-346615d4a0029fb3f59344a98963b7fea8356b8c.zip
Test framework for Web UI.
Test framework for Web UI has been created using qUnit. The test files are located in install/static/test. The main page is index.html which contains links to all test suites (xxx_tests.html). The test cases are stored in xxx_tests.js. All test suites can be executed at once using all_tests.html. The test data is stored in data folder. This patch includes test suites for ipa.js and entity.js. Some variables and functions in ipa.js have been modified to accomodate testing (e.g. JSON URL, error handler, synchronous operation). The sampledata has been moved to test/data. The develop.js and webui.js also have been modified accordingly.
Diffstat (limited to 'install/static/webui.js')
-rw-r--r--install/static/webui.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/install/static/webui.js b/install/static/webui.js
index 153a60965..09ed70929 100644
--- a/install/static/webui.js
+++ b/install/static/webui.js
@@ -72,10 +72,19 @@ $(function() {
};
function init_on_win(data, text_status, xhr) {
- ipa_cmd('user_find', [], {"whoami":"true","all":"true"}, whoami_on_win, null, null);
+ ipa_cmd('user_find', [], {"whoami":"true","all":"true"}, whoami_on_win,
+ function(xhr, options, thrownError) {
+ alert("Error: "+thrownError);
+ },
+ null
+ );
};
- ipa_init(null, init_on_win);
+ ipa_init(null, null, init_on_win,
+ function(xhr, options, thrownError) {
+ alert("Error: "+thrownError);
+ }
+ );
});
/* use this to track individual changes between two hashchange events */