Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ public void testCreateNewButton() throws Exception {
driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph()']")).click();
ZeppelinITUtils.sleep(1000, false);
driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this paragraph')]" +
"//div[@class='modal-footer']//button[contains(.,'OK')]")).click();

Integer deleteParagaphModal = driver.findElements(By.xpath("//div[@class='modal-dialog'][contains(. ,'delete this paragraph?')]")).size();
collector.checkThat("Before delete paragraph, Modal is shown",
deleteParagaphModal,
CoreMatchers.equalTo(1));

driver.findElement(By.xpath("//div[@class='bootstrap-dialog-footer']//button[contains(text() ,'OK')]")).click();

ZeppelinITUtils.sleep(1000, false);

setTextOfParagraph(1, " original paragraph ");
Expand Down Expand Up @@ -150,8 +156,16 @@ public void testRemoveButton() throws Exception {
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 deleteParagaphModal = driver.findElements(By.xpath("//div[@class='modal-dialog'][contains(. ,'delete this paragraph')]")).size();
collector.checkThat("Before delete paragraph, Modal is shown",
deleteParagaphModal,
CoreMatchers.equalTo(1));


driver.findElement(By.xpath("//div[@class='bootstrap-dialog-footer']//button[contains(text() ,'OK')]")).click();
ZeppelinITUtils.sleep(1000, false);

Integer newNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
collector.checkThat("After Remove : Number of paragraphs are",
oldNosOfParas-1,
Expand Down