Skip to content

Commit

Permalink
STNG-165 Improve unit test error logging, on Selenium testing (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkosternl authored Oct 9, 2024
1 parent f787c1c commit 6c0d7cd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assumptions.assumeFalse;

import java.time.Duration;
Expand Down Expand Up @@ -106,6 +107,7 @@ void runScenarioGroups() {
log.info("Stopping after first scenario group");
break;
}
log.info("Finished scenario group {}.", i + 1);
}
}

Expand All @@ -125,6 +127,10 @@ private boolean handleJsonPromptForText() {
promptText = fetchTransportDocument(promptText);
}

if (driver.findElements(By.id("actionInput")).isEmpty()) {
log.error("Error: No actionInput element found, while a jsonForPromptText was displayed!");
fail();
}
driver.findElement(By.id("actionInput")).sendKeys(promptText);
driver.findElement(By.id("submitActionButton")).click();
waitForUIReadiness();
Expand Down

0 comments on commit 6c0d7cd

Please sign in to comment.