falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rostafiyc...@apache.org
Subject [3/3] falcon git commit: FALCON-1270 SearchUI. Login screen changed to not have password field. Contributed by Namit Maheshwari
Date Fri, 12 Jun 2015 11:36:46 GMT
FALCON-1270 SearchUI. Login screen changed to not have password field. Contributed by Namit
Maheshwari


Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/c7565307
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/c7565307
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/c7565307

Branch: refs/heads/master
Commit: c756530723b84d23fb931df38b0c5cd54e9c4aca
Parents: 5ec4c70
Author: Ruslan Ostafiychuk <rostafiychuk@apache.org>
Authored: Fri Jun 12 14:36:06 2015 +0300
Committer: Ruslan Ostafiychuk <rostafiychuk@apache.org>
Committed: Fri Jun 12 14:36:06 2015 +0300

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                   |  2 ++
 .../falcon/regression/ui/search/LoginPage.java  | 23 ++------------------
 .../falcon/regression/searchUI/LoginTest.java   |  1 -
 3 files changed, 4 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/c7565307/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index eb08ba1..c54e142 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -351,6 +351,8 @@ Trunk (Unreleased)
    FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG)
 
   BUG FIXES
+   FALCON-1270 SearchUI. Login screen changed to not have password field (Namit Maheshwari
via Ruslan Ostafiychuk)
+
    FALCON-1266 LineageApiTest test fixes (Raghav Kumar Gautam via Ruslan Ostafiychuk)
 
    FALCON-1265 ListProcessInstancesTest test fixes (Raghav Kumar Gautam via Ruslan Ostafiychuk)

http://git-wip-us.apache.org/repos/asf/falcon/blob/c7565307/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/LoginPage.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/LoginPage.java
b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/LoginPage.java
index 3701d22..e292e44 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/LoginPage.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/LoginPage.java
@@ -31,8 +31,7 @@ import org.testng.Assert;
 /** Page object for the Login Page. */
 public class LoginPage extends AbstractSearchPage {
     private static final Logger LOGGER = Logger.getLogger(LoginPage.class);
-    public static final String UI_DEFAULT_USER = "ambari-qa";
-    public static final String UI_DEFAULT_PASSWD = "admin";
+    public static final String UI_DEFAULT_USER = "hrt_qa";
 
     public LoginPage(WebDriver driver) {
         super(driver);
@@ -61,29 +60,13 @@ public class LoginPage extends AbstractSearchPage {
         final WebElement userTextBox = getUserTextBox();
 
         final WebElement userWarnLabel = getParentElement(userTextBox).findElement(
-            By.xpath("//label[@class='custom-danger validationMessageGral']"));
+            By.xpath("//label[contains(@class, 'custom-danger') and contains(@class, 'validationMessageGral')]"));
         if (userWarnLabel.isDisplayed()) {
             return userWarnLabel.getText();
         }
         return "";
     }
 
-    private WebElement getPasswdTextBox() {
-        return loginElem.findElement(By.xpath("//input[@name='password']"));
-    }
-
-    public void appendToPasswd(String text) {
-        getPasswdTextBox().sendKeys(text);
-    }
-    public String getPasswdVisibleWarning() {
-        final WebElement passwdWarnLabel = getParentElement(getPasswdTextBox()).findElements(
-            By.xpath("//label[@class='custom-danger validationMessageGral']")).get(1);
-        if (passwdWarnLabel.isDisplayed()) {
-            return passwdWarnLabel.getText();
-        }
-        return "";
-    }
-
     /** Try to login by pressing the login button. */
     public void tryLogin() {
         LOGGER.info("Trying to login.");
@@ -95,9 +78,7 @@ public class LoginPage extends AbstractSearchPage {
     /** Login successfully and take to the next page i.e. search page. */
     public SearchPage doDefaultLogin() {
         getUserTextBox().clear();
-        getPasswdTextBox().clear();
         appendToUserName(UI_DEFAULT_USER);
-        appendToPasswd(UI_DEFAULT_PASSWD);
         tryLogin();
         LOGGER.info("Search page should have opened.");
         final SearchPage searchPage = PageFactory.initElements(driver, SearchPage.class);

http://git-wip-us.apache.org/repos/asf/falcon/blob/c7565307/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/LoginTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/LoginTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/LoginTest.java
index a40fe20..d9fa35f 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/LoginTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/LoginTest.java
@@ -93,7 +93,6 @@ public class LoginTest extends BaseUITestClass {
 
         loginPage.tryLogin();
 
-        Assert.assertEquals(loginPage.getPasswdVisibleWarning(), "Please enter your password.");
     }
 
     @Test


Mime
View raw message