You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2022/04/08 20:43:00 UTC

[directory-fortress-commander] 05/05: get the group and audit mod test cases working

This is an automated email from the ASF dual-hosted git repository.

smckinney pushed a commit to branch wicket9
in repository https://gitbox.apache.org/repos/asf/directory-fortress-commander.git

commit 58de4f0edb935293d0be44651fa70d687445cd63
Author: Shawn McKinney <sm...@symas.com>
AuthorDate: Fri Apr 8 15:31:46 2022 -0500

    get the group and audit mod test cases working
---
 src/main/resources/FortressWebDemoUsers.xml        |  1 -
 .../web/integration/FortressWebSeleniumITCase.java | 37 ++++++++++++++++------
 2 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/src/main/resources/FortressWebDemoUsers.xml b/src/main/resources/FortressWebDemoUsers.xml
index 2db88a8..3012c13 100644
--- a/src/main/resources/FortressWebDemoUsers.xml
+++ b/src/main/resources/FortressWebDemoUsers.xml
@@ -128,7 +128,6 @@
                 <permgrant objName="org.apache.directory.fortress.core.impl.ReviewMgrImpl" opName="readUser" roleNm="fortress-web-audit-admin" admin="true"/>
                 <permgrant objName="org.apache.directory.fortress.core.impl.ReviewMgrImpl" opName="findUsers" roleNm="fortress-web-audit-admin" admin="true"/>
                 <permgrant objName="org.apache.directory.fortress.core.impl.ReviewMgrImpl" opName="findPermissions" roleNm="fortress-web-audit-admin" admin="true"/>
-
                 <permgrant objName="org.apache.directory.fortress.core.impl.GroupMgrImpl" opName="read" roleNm="fortress-web-audit-admin" admin="true"/>
                 <permgrant objName="org.apache.directory.fortress.core.impl.GroupMgrImpl" opName="find" roleNm="fortress-web-audit-admin" admin="true"/>
                 <permgrant objName="org.apache.directory.fortress.core.impl.GroupMgrImpl" opName="findWithUsers" roleNm="fortress-web-audit-admin" admin="true"/>
diff --git a/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java b/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
index be90f2f..892ec6a 100644
--- a/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
+++ b/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
@@ -86,7 +86,7 @@ public class FortressWebSeleniumITCase
     {
         // http default:
         baseUrl = "http://localhost:8080";
-        //baseUrl = "http://fortress-a:8080";
+        //baseUrl = "https://fortress-a:8443";
         driver.manage().timeouts().implicitlyWait( 5, TimeUnit.SECONDS );
     }
 
@@ -162,15 +162,7 @@ public class FortressWebSeleniumITCase
             admrles();
             admobjs();
             admperms();
-            plcys();
             groups();
-
-            if( Config.getInstance().isOpenldap())
-            {
-               binds();
-               authzs();
-               mods();
-            }
         }
 
         /*****
@@ -199,6 +191,33 @@ public class FortressWebSeleniumITCase
         doNegativeLinkTest( ADMOBJS, "ObjectAdminPage", "test1" );
     }
 
+    @Test
+    public void testCase3() throws Exception
+    {
+        LOG.info( "Begin FortressWebSeleniumITCase 3" );
+        driver.get( baseUrl + FORTRESS_WEB );
+        login( "test2", "password" );
+        TUtils.sleep( 1 );
+        if( Config.getInstance().isOpenldap())
+        {
+            plcys();
+            binds();
+            authzs();
+            // mods requires that: is.arbac02=true
+            mods();
+        }
+
+        doNegativeLinkTest( ROLES, "RolePage", "test1" );
+        doNegativeLinkTest( POBJS, "ObjectPage", "test1" );
+        doNegativeLinkTest( PERMS, "PermPage", "test1" );
+        doNegativeLinkTest( SSDS, "SdStaticPage", "test1" );
+        doNegativeLinkTest( DSDS, "SdDynamicPage", "test1" );
+        doNegativeLinkTest( OUSERS, "OuUserPage", "test1" );
+        doNegativeLinkTest( OUPRMS, "OuPermPage", "test1" );
+        doNegativeLinkTest( ADMRLES, "RoleAdminPage", "test1" );
+        doNegativeLinkTest( ADMOBJS, "ObjectAdminPage", "test1" );
+    }
+
     private void login( String userId, String password )
     {
         driver.findElement( By.id( GlobalIds.USER_ID ) ).clear();