diff options
author | Adam Young <ayoung@redhat.com> | 2011-07-25 12:15:14 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-07-28 14:17:25 -0400 |
commit | b36df6e9b9c1104d37fe14782a7e21e57097a7c0 (patch) | |
tree | 1eca6d4b0f7127b01f2e366919981ed90090ee95 /install/ui/test/details_tests.js | |
parent | 264ed38fa206537d7b160ea5d7586d071575c610 (diff) | |
download | freeipa-b36df6e9b9c1104d37fe14782a7e21e57097a7c0.tar.gz freeipa-b36df6e9b9c1104d37fe14782a7e21e57097a7c0.tar.xz freeipa-b36df6e9b9c1104d37fe14782a7e21e57097a7c0.zip |
removing setters setup and init
change widget and widget unit tests to hold on to entity, not entity name.
Replacing entity_name with entity.name in most places.
The one exception is columns for table_widget.
Widgets that refer to other entities have to have late resolution of the entity object, due to circular dependencies.
cleanup entity assignment.
removed template and layout,
merged setup into create
adder dialogs adjust height for external
removed init from widget, isection, association, facet, host and service
Make unit tests use factory.
fix functional tests to click find link correctly.
tweak to activation test, but still broken.
moved initialization code to the end
use --all for hbacrule find, so the type shows up now
fixed dns exception code and exception handling for get_entity
replace metadata look up with value from entity.
fixed author lines
removed duplicate columns in managed by facets.
tweak to nav fix in order to initialize tab.
more defensive code
update metadata for true false
one line init for entity_name in widget
move init code to end of constructor functions
moved constants to start of function for adder_dialog
external fields for dialogs initialized at dialog creation
sudo sections: move add fields and columns to widget definition.
The parameter validation in IPA.column ...This is precondition checking. Note that it merely throws an exception if the entity_name is not set. I want this stuff at the top of the function so that it is obvious to people looking to use them what is required. I added a comment to make this clear, but I'd like to keep precondition checking at the top of the function.
decreased the scope of the pkey_name and moved the initiailzation fof columns into the setup_column function for association_tables
return false at the end of click handler
removed blank labels in sudo command section
fix radio buttons for sudo category
fixed table side for adder dialogs with external fields
comments for future direction with add_columns
https://fedorahosted.org/freeipa/ticket/1451
https://fedorahosted.org/freeipa/ticket/1462
https://fedorahosted.org/freeipa/ticket/1493
https://fedorahosted.org/freeipa/ticket/1497
https://fedorahosted.org/freeipa/ticket/1532
https://fedorahosted.org/freeipa/ticket/1534
Diffstat (limited to 'install/ui/test/details_tests.js')
-rw-r--r-- | install/ui/test/details_tests.js | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/install/ui/test/details_tests.js b/install/ui/test/details_tests.js index 28e2029de..e06ddc23c 100644 --- a/install/ui/test/details_tests.js +++ b/install/ui/test/details_tests.js @@ -59,13 +59,13 @@ module('details', { test("Testing IPA.details_section.create().", function() { var section = IPA.details_list_section({ + entity: IPA.get_entity('user'), name:'IDIDID', label:'NAMENAMENAME'}). text({name:'cn'}). text({name:'uid'}). text({name:'mail'}); section.entity_name = 'user'; - section.init(); var fields = section.fields.values; var container = $("<div/>"); @@ -116,7 +116,7 @@ test("Testing IPA.details_section.create().", function() { -test("Testing details lifecycle: create, setup, load.", function(){ +test("Testing details lifecycle: create, load.", function(){ var result = {}; @@ -133,7 +133,6 @@ test("Testing details lifecycle: create, setup, load.", function(){ } }).execute(); - var setup_called = false; var save_called = false; var load_called = false; @@ -142,9 +141,6 @@ test("Testing details lifecycle: create, setup, load.", function(){ var update_success_called = false; var update_failure_called = false; - function setup_status(){ - setup_called = true; - } function save_password(){ save_called = true; @@ -158,11 +154,6 @@ test("Testing details lifecycle: create, setup, load.", function(){ function test_widget(spec){ var widget = IPA.widget(spec); - widget.setup = function(container) { - setup_called = true; - widget.widget_setup(container); - }; - widget.load = function(record) { load_called = true; widget.widget_load(record); @@ -198,7 +189,7 @@ test("Testing details lifecycle: create, setup, load.", function(){ name:'facsimiletelephonenumber'}] } ]}).build(); - entity.init(); + var entity_container = $('<div/>', { name: 'user', @@ -216,7 +207,6 @@ test("Testing details lifecycle: create, setup, load.", function(){ }); facet.create(facet_container); - facet.setup(facet_container); facet.load(result); @@ -243,11 +233,6 @@ test("Testing details lifecycle: create, setup, load.", function(){ facet_container.attr('id','user'); - ok ( - setup_called, - 'Setup status called' - ); - ok (load_called, 'load manager called'); var section = facet.sections.get('contact'); @@ -266,10 +251,10 @@ test("Testing details lifecycle: create, setup, load.", function(){ }); -test("Testing IPA.details_section_setup again()",function(){ +test("Testing IPA.details_section_create again()",function(){ var section = IPA.details_list_section({ - name: 'IDIDID', label: 'NAMENAMENAME'}). + name: 'IDIDID', label: 'NAMENAMENAME',entity: IPA.get_entity('user'),}). text({name:'cn', label:'Entity Name'}). text({name:'description', label:'Description'}). text({name:'number', label:'Entity ID'}); @@ -281,13 +266,8 @@ test("Testing IPA.details_section_setup again()",function(){ var result = {}; section.create(container); - section.setup(container); section.load(result); - //var h2= container.find('h2'); - //ok(h2); - //ok(h2[0].innerHTML.indexOf(section.label) > 1,"find name in html"); - var dl = $('dl', container); ok( dl.length, |