You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by co...@apache.org on 2016/02/20 18:02:49 UTC
incubator-zeppelin git commit: Add test case for remove paragraph
button
Repository: incubator-zeppelin
Updated Branches:
refs/heads/master 6ab4b6276 -> 4a3b74405
Add test case for remove paragraph button
What is this PR for?
Add a new test case for testing the Remove Button.
Remove button is used for removing Paragraph in notebook
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 #691 from ravicodder/testRemoveButton and squashes the following commits:
bfba235 [Ravi Ranjan] creating space between test cases
a312f66 [Ravi Ranjan] Merge remote-tracking branch 'origin/master' into testRemoveButton
6b0f041 [Ravi Ranjan] Modify Exception from ElementNotVisible Exception
c378439 [Ravi Ranjan] Add LOG.error message in catch statement
6622781 [Ravi Ranjan] Modifeid Debug message and checkthat condition.
05e4e49 [Ravi Ranjan] Add test case for remove paragraph button
Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/4a3b7440
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/4a3b7440
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/4a3b7440
Branch: refs/heads/master
Commit: 4a3b74405641074577736d36cdab3cdf41d07880
Parents: 6ab4b62
Author: Ravi Ranjan <ra...@gmail.com>
Authored: Wed Feb 17 15:18:33 2016 +0530
Committer: Damien CORNEAU <co...@gmail.com>
Committed: Sat Feb 20 09:02:36 2016 -0800
----------------------------------------------------------------------
.../integration/ParagraphActionsIT.java | 35 ++++++++++++++++++++
1 file changed, 35 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/4a3b7440/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 235c869..0af660c 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
@@ -138,6 +138,41 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
}
@Test
+ public void testRemoveButton() throws InterruptedException {
+ if (!endToEndTestEnabled()) {
+ return;
+ }
+ try {
+ createNewNote();
+
+ waitForParagraph(1, "READY");
+ driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+ driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='insertNew()']")).click();
+ waitForParagraph(2, "READY");
+ Integer oldNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+ collector.checkThat("Before Remove : Number of paragraphs are ",
+ oldNosOfParas,
+ CoreMatchers.equalTo(2));
+ driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+ driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph()']")).click();
+ sleep(1000, true);
+ driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this paragraph')]" +
+ "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
+ Integer newNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+ collector.checkThat("After Remove : Number of paragraphs are",
+ oldNosOfParas-1,
+ CoreMatchers.equalTo(newNosOfParas));
+ ZeppelinITUtils.sleep(1000, false);
+ deleteTestNotebook(driver);
+
+ } catch (Exception e) {
+ LOG.error("Exception in ParagraphActionsIT while testRemoveButton ", e);
+ File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
+ throw e;
+ }
+ }
+
+ @Test
public void testMoveUpAndDown() throws Exception {
if (!endToEndTestEnabled()) {
return;