Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4FDB2200B3B for ; Mon, 11 Jul 2016 18:51:32 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4E596160A78; Mon, 11 Jul 2016 16:51:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 989F0160A5E for ; Mon, 11 Jul 2016 18:51:31 +0200 (CEST) Received: (qmail 35312 invoked by uid 500); 11 Jul 2016 16:51:30 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 35303 invoked by uid 99); 11 Jul 2016 16:51:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2016 16:51:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B3D2FDFFF8; Mon, 11 Jul 2016 16:51:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smckinney@apache.org To: commits@directory.apache.org Message-Id: <9e5b978b0d664e158c441f2ab50624d8@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Mon, 11 Jul 2016 16:51:32 -0000 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 Authored: Mon Jul 11 04:17:02 2016 -0500 Committer: Shawn McKinney 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();