You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by fe...@apache.org on 2016/03/04 04:37:31 UTC

incubator-zeppelin git commit: Add new selenium test case to test width button for paragraph

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 1777524e8 -> fe48e982d


Add new selenium test case to test width button for paragraph

##What is this PR for?

Add a new test case for testing the Width button.

##What type of PR is it?

Test

##Is there a relevant Jira issue?

NA

##How should this be tested?

On OSX, you'll need firefox 42.0 installed, then you can run with

PATH=~/Applications/Firefox.app/Contents/MacOS/:$PATH CI="" \
mvn -Dtest=org.apache.zeppelin.ParagraphActionsIT -Denforcer.skip=true \
test -pl zeppelin-server

##Questions:

Does the licenses files need update?NO
Is there breaking changes for older versions?NO
Does this needs documentation?NO

Author: Ravi Ranjan <ra...@gmail.com>

Closes #693 from ravicodder/testWidth and squashes the following commits:

2ce414d [Ravi Ranjan] Merge branch 'master' of https://github.com/apache/incubator-zeppelin into testWidth
2075dce [Ravi Ranjan] Merge branch 'master' of https://github.com/apache/incubator-zeppelin into testWidth
480b9f7 [Ravi Ranjan] Correcting bad rebase
a57d01e [Ravi Ranjan] Merge remote-tracking branch 'origin/master' into testWidth
a3b1c3a [Ravi Ranjan] Use handleException
1dd8042 [Ravi Ranjan] Merge branch 'master' of https://github.com/apache/incubator-zeppelin into testWidth
99af53f [Ravi Ranjan] Merge branch 'master' of https://github.com/apache/incubator-zeppelin into testWidth
9ada8b2 [Ravi Ranjan] Modify InterruptedException to Exception
542d08c [Ravi Ranjan] Merge branch 'master' of https://github.com/apache/incubator-zeppelin into testWidth
5395554 [Ravi Ranjan] New test case using col-md-X and reverting irrelevent files r Please enter the commit message for your changes. Lines starting


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

Branch: refs/heads/master
Commit: fe48e982d847c33e11b97931fced86b267fd1ccf
Parents: 1777524
Author: Ravi Ranjan <ra...@gmail.com>
Authored: Thu Feb 25 11:01:42 2016 +0530
Committer: Felix Cheung <fe...@apache.org>
Committed: Thu Mar 3 19:37:23 2016 -0800

----------------------------------------------------------------------
 .../integration/ParagraphActionsIT.java         | 29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/fe48e982/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
index d445b93..049579a 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
@@ -30,6 +30,7 @@ import org.junit.rules.ErrorCollector;
 import org.openqa.selenium.*;
 import org.openqa.selenium.interactions.Action;
 import org.openqa.selenium.interactions.Actions;
+import org.openqa.selenium.support.ui.Select;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -298,4 +299,32 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
     }
 
   }
+
+  @Test
+  public void testWidth() throws Exception {
+    if (!endToEndTestEnabled()) {
+      return;
+    }
+    try {
+      createNewNote();
+      waitForParagraph(1, "READY");
+
+      collector.checkThat("Default Width is 12 ",
+          driver.findElement(By.xpath("//div[contains(@class,'col-md-12')]")).isDisplayed(),
+          CoreMatchers.equalTo(true));
+      for (Integer newWidth = 1; newWidth <= 11; newWidth++) {
+        driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+        String visibleText = newWidth.toString();
+        new Select(driver.findElement(By.xpath(getParagraphXPath(1)
+            + "//ul/li/a/form/select[(@ng-change='changeColWidth()')]"))).selectByVisibleText(visibleText);
+        collector.checkThat("New Width is : " + newWidth,
+            driver.findElement(By.xpath("//div[contains(@class,'col-md-" + newWidth + "')]")).isDisplayed(),
+            CoreMatchers.equalTo(true));
+      }
+    } catch (Exception e) {
+        handleException("Exception in ParagraphActionsIT while testWidth ", e);
+    }
+
+  }
+
 }
\ No newline at end of file