update selenium test

This commit is contained in:
Lee moon soo 2016-11-24 09:02:27 -08:00
parent e69f1a12c4
commit 73b3a81ad5
3 changed files with 10 additions and 10 deletions

View file

@ -269,11 +269,11 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
createNewNote();
waitForParagraph(1, "READY");
String xpathToOutputField = getParagraphXPath(1) + "//div[contains(@ng-if,'getResultType()')]";
String xpathToOutputField = getParagraphXPath(1) + "//div[contains(@id,\"_text\")]";
setTextOfParagraph(1, "println (\"abcd\")");
collector.checkThat("Before Run Output field contains ",
driver.findElement(By.xpath(xpathToOutputField)).getText(),
CoreMatchers.equalTo(""));
driver.findElements(By.xpath(xpathToOutputField)).size(),
CoreMatchers.equalTo(0));
driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@ng-click='runParagraph(getEditorValue())']")).click();
waitForParagraph(1, "FINISHED");
collector.checkThat("After Run Output field contains ",
@ -283,8 +283,8 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
clickAndWait(By.xpath(getParagraphXPath(1) +
"//ul/li/a[@ng-click='clearParagraphOutput()']"));
collector.checkThat("After Clear Output field contains ",
driver.findElement(By.xpath(xpathToOutputField)).getText(),
CoreMatchers.equalTo(""));
driver.findElements(By.xpath(xpathToOutputField)).size(),
CoreMatchers.equalTo(0));
ZeppelinITUtils.sleep(1000, false);
deleteTestNotebook(driver);

View file

@ -100,7 +100,7 @@ public class SparkParagraphIT extends AbstractZeppelinIT {
}
WebElement paragraph2Result = driver.findElement(By.xpath(
getParagraphXPath(2) + "//div[@class=\"tableDisplay\"]"));
getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
collector.checkThat("2nd Paragraph from SparkParagraphIT of testSpark result: ",
paragraph2Result.getText().toString(), CoreMatchers.containsString(
@ -135,7 +135,7 @@ public class SparkParagraphIT extends AbstractZeppelinIT {
}
WebElement paragraph1Result = driver.findElement(By.xpath(
getParagraphXPath(1) + "//div[@class=\"tableDisplay\"]"));
getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
collector.checkThat("Paragraph from SparkParagraphIT of testPySpark result: ",
paragraph1Result.getText().toString(), CoreMatchers.equalTo("test loop 0\ntest loop 1\ntest loop 2")
);
@ -154,7 +154,7 @@ public class SparkParagraphIT extends AbstractZeppelinIT {
);
}
WebElement paragraph2Result = driver.findElement(By.xpath(
getParagraphXPath(2) + "//div[@class=\"tableDisplay\"]"));
getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
collector.checkThat("Paragraph from SparkParagraphIT of testPySpark result: ",
paragraph2Result.getText().toString(), CoreMatchers.equalTo("2")
);
@ -184,7 +184,7 @@ public class SparkParagraphIT extends AbstractZeppelinIT {
}
WebElement paragraph1Result = driver.findElement(By.xpath(
getParagraphXPath(1) + "//div[@class=\"tableDisplay\"]/div/div/div/div/div/div[1]"));
getParagraphXPath(1) + "//div[contains(@id,\"_graph\")]/div/div/div/div/div[1]"));
collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
paragraph1Result.getText().toString(), CoreMatchers.equalTo("age\njob\nmarital\neducation\nbalance\n" +
"30 unemployed married primary 1,787"));

View file

@ -235,7 +235,7 @@ public class ZeppelinIT extends AbstractZeppelinIT {
// check expected text
WebElement paragraph1Result = driver.findElement(By.xpath(
getParagraphXPath(1) + "//div[@class=\"tableDisplay\"]"));
getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
collector.checkThat("Paragraph from ZeppelinIT of testSparkInterpreterDependencyLoading result: ",
paragraph1Result.getText().toString(), CoreMatchers.containsString(