From eb83c2170a64aa9f760f25d1019bb9bf6f6238eb Mon Sep 17 00:00:00 2001 From: Adam Young <ayo...@redhat.com> Date: Mon, 17 Jan 2011 12:31:31 -0500 Subject: [PATCH] search unit tests Unit tests were by the hiding of the search, and elements from the action panel.
--- install/static/test/entity_tests.js | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/install/static/test/entity_tests.js b/install/static/test/entity_tests.js index a24f80810363b1630f3377e6af8a89e4be5bb03d..21fff48f8f46970c214862fe35e5b462b58d8d62 100644 --- a/install/static/test/entity_tests.js +++ b/install/static/test/entity_tests.js @@ -122,8 +122,8 @@ test('Testing ipa_facet_setup_views().', function() { ); var li = views.first(); - ok( li.hasClass('search-facet'), - 'Checking the search facet' + ok( li.children().first().hasClass('action-controls'), + 'Checking that first item in list is placement for controls' ); li = li.next(); // skip action controls @@ -148,11 +148,14 @@ test('Testing ipa_facet_setup_views().', function() { var pkey_input = $('input[name=pkey]', action_panel); ok(pkey_input.length,'pkey input exists'); var search_facets = $('li.search-facet', action_panel); - equals(search_facets.length,1,'one search facet in action panel'); + equals(search_facets.length,0,'search facet should not show up in action panel'); var entity_facets = $('li.entity-facet', action_panel); /*No longer automatically adding details, so ony the assoc. facets */ - equals(entity_facets.length,3,'3 entity facets in action panel'); - + equals(entity_facets.length,4,'4 hidden entity facets in action panel'); + entity_facets.each(function() { + ok( $(this).hasClass('entity-facet-disabled'), + 'entity facets are disabled'); + }); for ( var entity_facet = entity_facets.first(); entity_facet.length; -- 1.7.3.4
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel