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 dd65c66
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion install/cws-ui/initiators.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<td><input id="saveXmlBtn" type="button" class="btn btn-primary" value="Save the XML file"/></td>
<td>
<label>Enable All</label>
<div class="form-check form-switch">
<div class="form-check form-switch" id="active-all">
<input class="form-check-input" type="checkbox" role="switch" id="activate-all-inits">
<label class="form-check-label" for="activate-all-inits">Power</label>
</div>
Expand Down

0 comments on commit dd65c66

Please sign in to comment.