directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-commander git commit: modify selenium tests for new user and admin role assignment dropdown controls
Date Mon, 11 Jul 2016 16:51:30 GMT
Repository: directory-fortress-commander
Updated Branches:
  refs/heads/master cc4d055da -> 9cf759d48


modify selenium tests for new user and admin role assignment dropdown controls


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/commit/9cf759d4
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/tree/9cf759d4
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/diff/9cf759d4

Branch: refs/heads/master
Commit: 9cf759d48913e717d85b595210ca7457d955d15f
Parents: cc4d055
Author: Shawn McKinney <smckinney@apache.org>
Authored: Mon Jul 11 04:17:02 2016 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Mon Jul 11 04:17:02 2016 -0500

----------------------------------------------------------------------
 .../directory/fortress/web/common/GlobalIds.java       |  2 ++
 .../web/integration/FortressWebSeleniumITCase.java     | 13 ++++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/9cf759d4/src/main/java/org/apache/directory/fortress/web/common/GlobalIds.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/common/GlobalIds.java b/src/main/java/org/apache/directory/fortress/web/common/GlobalIds.java
index e8648b8..060b733 100644
--- a/src/main/java/org/apache/directory/fortress/web/common/GlobalIds.java
+++ b/src/main/java/org/apache/directory/fortress/web/common/GlobalIds.java
@@ -89,6 +89,8 @@ public class GlobalIds
     public static final String WEDNESDAY_ARC = "wednesdayARC";
     public static final String THURSDAY_ARC = "thursdayARC";
     public static final String FRIDAY_ARC = "fridayARC";
+    public static final String ASSIGN_NEW_ROLE = "newUserRole";
+    public static final String ASSIGN_NEW_ADMIN_ROLE = "newUserAdminRole";
     public static final String ASSIGN_ADMIN_ROLE = "assignAdminRole";
     public static final String DESCRIPTION = "description";
     public static final String EMAILS = "emails";

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/9cf759d4/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
----------------------------------------------------------------------
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 3869119..8ffe47b 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
@@ -58,7 +58,7 @@ public class FortressWebSeleniumITCase
 
         // tomcat default:
         baseUrl = "http://localhost:8080";
-        //baseUrl = "http://10.71.6.14:8080";
+        //baseUrl = "http://10.71.6.36:8080";
         //baseUrl = "http://fortressdemo2.com:8080";
         // tomcat SSL:
         //baseUrl = "https://localhost:8443";
@@ -173,7 +173,8 @@ TODO: FIX ME:
         driver.findElement( By.name( GlobalIds.ADD ) ).click();
         TUtils.sleep( 1 );
         driver.findElement( By.id( GlobalIds.ROLE_ASSIGNMENTS_LABEL ) ).click();
-        ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('roles')).val('role1');"
);
+        //( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('roles')).val('role1');"
);
+        driver.findElement( By.id( GlobalIds.ASSIGN_NEW_ROLE ) ).sendKeys( "ROLE_USERS" );
         driver.findElement( By.id( GlobalIds.BEGIN_TIME_RC ) ).clear();
         driver.findElement( By.id( GlobalIds.BEGIN_TIME_RC ) ).sendKeys( "8:00 AM" );
         driver.findElement( By.id( GlobalIds.END_TIME_RC ) ).clear();
@@ -198,9 +199,10 @@ TODO: FIX ME:
         driver.findElement( By.name( GlobalIds.ASSIGN ) ).click();
         TUtils.sleep( 1 );
         driver.findElement( By.id( GlobalIds.ROLE_ASSIGNMENTS_LABEL ) ).click();
+        driver.findElement( By.id( GlobalIds.ASSIGN_NEW_ROLE ) ).sendKeys( "" );
         driver.findElement( By.name( GlobalIds.ROLES_SEARCH ) ).click();
         TUtils.sleep( 2 );
-        driver.findElement( By.linkText( "6" ) ).click();
+        driver.findElement( By.linkText( "3" ) ).click();
         TUtils.sleep( 2 );
         driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
         TUtils.sleep( 2 );
@@ -217,8 +219,9 @@ TODO: FIX ME:
                         System.out.println("adminRoles is NOT displayed!!!");
                     }
             */
-        ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('adminRoles')).val"
+
-            "('DemoAdminUsers');" );
+        //( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('adminRoles')).val"
+
+        //    "('DemoAdminUsers');" );
+        driver.findElement( By.id( GlobalIds.ASSIGN_NEW_ADMIN_ROLE ) ).sendKeys( "o" );
         driver.findElement( By.id( GlobalIds.BEGIN_TIME_ARC ) ).clear();
         driver.findElement( By.id( GlobalIds.BEGIN_TIME_ARC ) ).sendKeys( "8:00 AM" );
         driver.findElement( By.id( GlobalIds.END_TIME_ARC ) ).clear();


Mime
View raw message