From 26ded75be94e60a34a19d06ce4a5fb3185875cd5 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 10 Aug 2011 20:03:02 -0500 Subject: Fixed layout problem in permission adder dialog. In order to maintain consistent layout between details page and dialog boxes the IPA.details_list_section has been replaced with IPA.details_table_section which is based on table. The IPA.target_section and other subclasses of IPA.details_list_section have been converted to use IPA.details_table_section as well. The unit tests have been updated accordingly. Ticket #1648 --- .../ui/test/data/permission_show_targetgroup.json | 10 +- install/ui/test/details_tests.js | 106 ++++++++++----------- 2 files changed, 59 insertions(+), 57 deletions(-) (limited to 'install/ui/test') diff --git a/install/ui/test/data/permission_show_targetgroup.json b/install/ui/test/data/permission_show_targetgroup.json index 0a140c20..cfe49b93 100644 --- a/install/ui/test/data/permission_show_targetgroup.json +++ b/install/ui/test/data/permission_show_targetgroup.json @@ -5,16 +5,24 @@ "result": { "attributelevelrights": { "aci": "rscwo", + "attrs": "rscwo", "businesscategory": "rscwo", "cn": "rscwo", "description": "rscwo", + "filter": "rscwo", + "group": "rscwo", + "ipapermissiontype": "rscwo", "member": "rscwo", "nsaccountlock": "rscwo", "o": "rscwo", "objectclass": "rscwo", "ou": "rscwo", "owner": "rscwo", - "seealso": "rscwo" + "permissions": "rscwo", + "seealso": "rscwo", + "subtree": "rscwo", + "targetgroup": "rscwo", + "type": "rscwo" }, "cn": [ "targetgroup" diff --git a/install/ui/test/details_tests.js b/install/ui/test/details_tests.js index e06ddc23..122234e7 100644 --- a/install/ui/test/details_tests.js +++ b/install/ui/test/details_tests.js @@ -58,7 +58,7 @@ module('details', { test("Testing IPA.details_section.create().", function() { - var section = IPA.details_list_section({ + var section = IPA.details_table_section({ entity: IPA.get_entity('user'), name:'IDIDID', label:'NAMENAMENAME'}). text({name:'cn'}). @@ -71,45 +71,38 @@ test("Testing IPA.details_section.create().", function() { var container = $("
"); section.create(container); - var dl = $('dl', container); + var table = $('table', container); same( - dl.length, 1, - 'Checking dl tag' + table.length, 1, + 'Verifying table' ); + var rows = $('tr', table); same( - dl.attr('id'), section.name, - 'Checking section name' - ); - - var dts = $('dt', dl); - same( - dts.length, fields.length, // each field generates dt & dd - 'Checking number of children' + rows.length, fields.length, + 'Verifying table rows' ); for (var i=0; i