Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrodjpl committed Apr 15, 2024
1 parent 8bbed3f commit bfe48c9
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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")) {
Expand Down

0 comments on commit bfe48c9

Please sign in to comment.