diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java index 10a28efd..8c8ca4d4 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java @@ -43,10 +43,15 @@ public void runSnippetsPageTest() throws IOException { login(); runSnippetsModelTest(); + log.info("Done model test: "+ testCasesCompleted); runValidateButtonTest(); + log.info("Done validate test: "+ testCasesCompleted); runUpdateSnippetTest(); + log.info("Done snippets test: "+ testCasesCompleted); runUpdateErrorTest(); + log.info("Done validate error test: "+ testCasesCompleted); runReloadEditorTest(); + log.info("Done editor test: "+ testCasesCompleted); if(Integer.toString(testCasesCompleted).equals("5")) { scriptPass = true; @@ -227,6 +232,12 @@ public void runUpdateSnippetTest() throws IOException { WebElement validateAndSaveButton = driver.findElement(By.id("validateAndSaveSnippetsSubmitBtn")); js.executeScript("arguments[0].scrollIntoViewIfNeeded();", validateAndSaveButton); + sleep(2000); + + screenShot("SnippetsTestIT-EXCEPTION"); + + String elementHTML = validateAndSaveButton.getAttribute("outerHTML"); + log.info(elementHTML); validateAndSaveButton.click(); @@ -321,8 +332,13 @@ public void runReloadEditorTest() throws IOException { driver.findElement(By.id("revertSnippetsSubmitBtn")).click(); waitForElementID("validateAndSaveSnippetsSubmitBtn"); + + validateAndSaveButton = driver.findElement(By.id("validateAndSaveSnippetsSubmitBtn")); + js.executeScript("arguments[0].scrollIntoViewIfNeeded();", validateAndSaveButton); + sleep(2000); + log.info("Clicking on 'Validate and Save' button"); - driver.findElement(By.id("validateAndSaveSnippetsSubmitBtn")).click(); + validateAndSaveButton.click(); log.info("Verifying 'Saved the snippets' shows up on the page."); if(findOnPage("Saved the snippets")) {