summaryrefslogtreecommitdiffstats
path: root/install/ui/test
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-05-26 17:57:39 -0500
committerAdam Young <ayoung@redhat.com>2011-05-27 13:06:57 -0400
commitaa29a8a769c62b07cc4e6d82fc79846505cc9fa3 (patch)
tree2131098b113c2bfecf1830feff0c08b3b2d1aabc /install/ui/test
parent17c3f9e84efcbeb3b5ae1de83d799974de3bb078 (diff)
downloadfreeipa.git-aa29a8a769c62b07cc4e6d82fc79846505cc9fa3.tar.gz
freeipa.git-aa29a8a769c62b07cc4e6d82fc79846505cc9fa3.tar.xz
freeipa.git-aa29a8a769c62b07cc4e6d82fc79846505cc9fa3.zip
Added Update and Reset buttons into Dirty dialog.
The Dirty dialogs have been combined into IPA.dirty_dialog. It provides the Update and Reset buttons with customizable callback. Previously the widget's dirty status is computed by comparing the old values with the new values. This method is sometimes inaccurate, so the is_dirty() method has been modified to simply return a flag which is set to true if the widget is changed. Ticket #896.
Diffstat (limited to 'install/ui/test')
-rw-r--r--install/ui/test/widget_tests.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/install/ui/test/widget_tests.js b/install/ui/test/widget_tests.js
index f4281e38..f323f969 100644
--- a/install/ui/test/widget_tests.js
+++ b/install/ui/test/widget_tests.js
@@ -185,13 +185,14 @@ test("IPA.table_widget" ,function(){
test("Testing base widget.", function() {
var update_called = false;
var spec = {
- name:'title',
- update:function(){
- update_called = true;
- }
+ name:'title'
};
var widget = IPA.widget(spec);
+ widget.update = function() {
+ update_called = true;
+ };
+
base_widget_test(widget,'user','test_value');
widget_string_test(widget);
ok (update_called, 'Update called');