summaryrefslogtreecommitdiffstats
path: root/install/ui/test/widget_tests.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-07-15 12:18:59 -0500
committerAdam Young <ayoung@redhat.com>2011-07-18 14:47:57 -0400
commit571274e978434a7b5e17100076172233e7320855 (patch)
tree6f3218dca5c41aad38d408f311546c72dd5c99d3 /install/ui/test/widget_tests.js
parent95901bbdb55cdf4213d3da4a79792805f7e8f264 (diff)
downloadfreeipa-571274e978434a7b5e17100076172233e7320855.tar.gz
freeipa-571274e978434a7b5e17100076172233e7320855.tar.xz
freeipa-571274e978434a7b5e17100076172233e7320855.zip
Entity select widget improvements
The IPA.entity_select_widget has been modified into a searchable and editable drop down list. The base functionality has been extracted into IPA.combobox_widget. Ticket #1361
Diffstat (limited to 'install/ui/test/widget_tests.js')
-rw-r--r--install/ui/test/widget_tests.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/install/ui/test/widget_tests.js b/install/ui/test/widget_tests.js
index 1abac1ca0..c3ae8bea1 100644
--- a/install/ui/test/widget_tests.js
+++ b/install/ui/test/widget_tests.js
@@ -265,10 +265,15 @@ test("IPA.select_widget" ,function(){
test("IPA.entity_select_widget" ,function(){
+
var widget = IPA.entity_select_widget({
- name: 'uid', entity:'user',field_name:'uid'});
+ name: 'uid',
+ other_entity: 'user',
+ other_field: 'uid'
+ });
+
base_widget_test(widget,'user','test_value');
- ok( $('#uid-entity-select option').length > 1,"options populatedfrom AJAX");
+ ok( $('option', widget.container).length > 1,"options populated from AJAX");
mock_record = {'uid':'kfrog'};
widget.load(mock_record);
same(widget.values[0],'kfrog','select set from values');
@@ -278,7 +283,7 @@ test("IPA.entity_select_widget" ,function(){
test("IPA.entity_link_widget" ,function(){
var widget = IPA.entity_link_widget({
name: 'gidnumber',
- other_entity:'group',
+ other_entity:'group'
});
base_widget_test(widget,'user','test_value');