summaryrefslogtreecommitdiffstats
path: root/install/ui/test
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2011-08-05 17:12:21 +0200
committerEndi S. Dewata <edewata@redhat.com>2011-08-05 19:14:19 +0000
commit08905eb9a9039b38c032275a87b4f5602e5a63dd (patch)
treea566ca2e61144a2d5d98b751f56c9af125b367e3 /install/ui/test
parent966fbd6485f3e2a1bc7fa4c3f96fcb435daa553d (diff)
downloadfreeipa-08905eb9a9039b38c032275a87b4f5602e5a63dd.tar.gz
freeipa-08905eb9a9039b38c032275a87b4f5602e5a63dd.tar.xz
freeipa-08905eb9a9039b38c032275a87b4f5602e5a63dd.zip
Fixed adding host without DNS reverse zone
https://fedorahosted.org/freeipa/ticket/1481 Shows status dialog instead of error dialog (error 4304 is treated like success). Refactored error dialog. Added generic message dialog (IPA.message_dialog) Modified core tests to work with dialog.
Diffstat (limited to 'install/ui/test')
-rw-r--r--install/ui/test/ipa_tests.html1
-rw-r--r--install/ui/test/ipa_tests.js23
2 files changed, 15 insertions, 9 deletions
diff --git a/install/ui/test/ipa_tests.html b/install/ui/test/ipa_tests.html
index 8f8ab93ef..b3bf93b16 100644
--- a/install/ui/test/ipa_tests.html
+++ b/install/ui/test/ipa_tests.html
@@ -11,6 +11,7 @@
<script type="text/javascript" src="../jquery-ui.js"></script>
<script type="text/javascript" src="../jquery.ordered-map.js"></script>
<script type="text/javascript" src="../ipa.js"></script>
+ <script type="text/javascript" src="../dialog.js"></script>
<script type="text/javascript" src="ipa_tests.js"></script>
</head>
<body>
diff --git a/install/ui/test/ipa_tests.js b/install/ui/test/ipa_tests.js
index 72a32783f..079b022b3 100644
--- a/install/ui/test/ipa_tests.js
+++ b/install/ui/test/ipa_tests.js
@@ -162,8 +162,10 @@ test("Testing successful IPA.command().", function() {
"Checking ajax invocation counter"
);
+ var dialog = $('#error_dialog');
+
ok(
- !IPA.error_dialog,
+ dialog.length == 0,
"The dialog box is not created."
);
@@ -237,7 +239,8 @@ test("Testing unsuccessful IPA.command().", function() {
on_error: error_handler
}).execute();
- var dialog = IPA.error_dialog.parent('.ui-dialog');
+ var dialog = $('#error_dialog');
+ var ui_dialog = dialog.parent('.ui-dialog');
equals(
ajax_counter, 1,
@@ -245,7 +248,7 @@ test("Testing unsuccessful IPA.command().", function() {
);
ok(
- dialog.length == 1 && IPA.error_dialog.dialog('isOpen'),
+ ui_dialog.length == 1 && dialog.dialog('isOpen'),
"The dialog box is created and open."
);
@@ -255,7 +258,7 @@ test("Testing unsuccessful IPA.command().", function() {
);
// search the retry button from the beginning
- var retry = $('button', dialog).first();
+ var retry = $('button', ui_dialog).first();
retry.trigger('click');
equals(
@@ -270,8 +273,8 @@ test("Testing unsuccessful IPA.command().", function() {
// search the retry button from the beginning again because the dialog
// has been recreated
- dialog = IPA.error_dialog.parent('.ui-dialog');
- retry = $('button', dialog).first();
+ ui_dialog = $('#error_dialog').parent('.ui-dialog');
+ retry = $('button', ui_dialog).first();
retry.trigger('click');
equals(
@@ -286,8 +289,8 @@ test("Testing unsuccessful IPA.command().", function() {
// search the cancel button from the beginning because the dialog has
// been recreated
- dialog = IPA.error_dialog.parent('.ui-dialog');
- var cancel = $('button', dialog).first().next();
+ ui_dialog = $('#error_dialog').parent('.ui-dialog');
+ var cancel = $('button', ui_dialog).first().next();
cancel.trigger('click');
equals(
@@ -295,8 +298,10 @@ test("Testing unsuccessful IPA.command().", function() {
"Checking ajax invocation counter"
);
+ dialog = $('#error_dialog');
+
ok(
- !IPA.error_dialog,
+ dialog.length == 0,
"After cancel, the dialog box is closed."
);