Refactor logging for activation key extraction.

Replaces multiline logging with formatted string for clarity and simplicity. Adds key logging to the test scenario context for better traceability.
This commit is contained in:
Factor committed 2025-03-20 19:45:55 +01:00
1 parent 9959fd42b8
commit ac27aa0623
1 file changed
+5 -3
+5 -3
View File
@@ -101,12 +101,14 @@ public class TempMailAPISteps extends Steps {
Matcher matcher = pattern.matcher(email.getHtml());
if (matcher.find()) {
log.info("""
String key = """
ESET Smart Security activation key found:
!!!!!!!!!!!!!!!!!!!!!!!!!!!
{}
%s
!!!!!!!!!!!!!!!!!!!!!!!!!!!
""", matcher.group());
""".formatted(matcher.group());
getContext().getScenario().log(key);
} else {
throw new RuntimeException("Activation key not found");
}