Skip to content

Commit 9ef4f93

Browse files
committed
adds nested variable test case and image CSS fix
1 parent 8cef371 commit 9ef4f93

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

src/main/java/com/automationanywhere/botcommand/actions/device/CreateFolders.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ public DictionaryValue action(
7777
@Idx(index = "4.1", type = AttributeType.VARIABLE)
7878
@Pkg(label = "Existing config dictionary", description = "Appends created folder" +
7979
" details: Key= folder name | value = folder path")
80-
Map<String, Value> configDictionary,
8180
@VariableType(DataType.DICTIONARY)
81+
Map<String, Value> configDictionary,
82+
8283

8384
@Idx(index = "4.2", type = AttributeType.TEXT)
8485
@Pkg(label = "Key suffix", description = "Adds suffix to the keys of generated folders",

src/main/java/com/automationanywhere/botcommand/actions/logs/StartLoggerSession.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public SessionValue start(
5353
@Pkg(label = "Append option for different levels of log", default_value = COMMON_FILE_ALL_LEVEL,
5454
default_value_type = DataType.STRING)
5555
@SelectModes
56+
@NotEmpty
5657
String logLevelsAndFileOption,
5758

5859
@Idx(index = "1.1.1", type = FILE)

src/main/resources/templates/log.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@
174174
height: 80%;
175175
background: radial-gradient(#82d893, #6aadb3);
176176
}
177+
.modal__inner__img>img{
178+
height : 100%;
179+
}
177180

178181
.btn {
179182
cursor: pointer;

src/test/java/logs/LoggerTest.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,15 @@ public void setUp() {
7272

7373
Map<String, Value> variable3 = new HashMap<>();
7474
List<Value> listValue = new ArrayList<>();
75+
Map<String, Value> dictValue = new HashMap<>();
76+
dictValue.put("my key", new StringValue("my value"));
77+
dictValue.put("my Date", new DateTimeValue(ZonedDateTime.now()));
78+
dictValue.put("my Number", new NumberValue(100));
7579
ListValue lv = new ListValue();
7680
listValue.add(new StringValue("Item 1"));
7781
listValue.add(new StringValue("Item 2"));
7882
listValue.add(new StringValue("Item 3"));
83+
listValue.add(new DictionaryValue(dictValue));
7984
lv.set(listValue);
8085
variable3.put("NAME", new StringValue("my list variable"));
8186
variable3.put("VALUE", lv);
@@ -112,9 +117,22 @@ public void testLogging() throws Exception {
112117
// Ensure the session was initialized properly
113118
Assert.assertNotNull(sessionValue);
114119

115-
// Log a test message
116-
logMessage.action((CustomLogger) sessionValue.getSession(), "INFO", "This is a test log message", true, LOG_VARIABLE,
117-
entryList, sourceMap);
120+
// Log test message
121+
int i = 0;
122+
while (i < 10) {
123+
logMessage.action((CustomLogger) sessionValue.getSession(), LEVEL_INFO, "This is a test info message", true,
124+
LOG_VARIABLE,
125+
entryList, sourceMap);
126+
logMessage.action((CustomLogger) sessionValue.getSession(), LEVEL_WARN, "This is a test warn message", true,
127+
LOG_VARIABLE,
128+
entryList, sourceMap);
129+
logMessage.action((CustomLogger) sessionValue.getSession(), LEVEL_ERROR, "This is a test error message",
130+
true,
131+
LOG_VARIABLE,
132+
entryList, sourceMap);
133+
++i;
134+
}
135+
118136

119137
// Verify the log file contains the expected output
120138
String content = new String(Files.readAllBytes(Paths.get(logFilePath)));

0 commit comments

Comments
 (0)