Skip to content

Commit 91adb1b

Browse files
TOS-897 Some data level changes for recorder
1 parent e83b0fe commit 91adb1b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

server/src/main/java/com/testsigma/dto/TestStepDTO.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ public TestStepRecorderDataMap mapTestData() {
158158
if(toElement != null) {
159159
testStepDataMap.setToUiIdentifier(toElement);
160160
}
161+
if(attribute != null) {
162+
testStepDataMap.setAttribute(attribute);
163+
}
161164
if(ifConditionExpectedResults.length > 0) {
162165
testStepDataMap.setIfConditionExpectedResults(ifConditionExpectedResults);
163166
}

server/src/main/java/com/testsigma/mapper/recorder/NLPTemplateMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ default List<NLPTemplateDTO> changeDataToCamelCase(List<NaturalTextActionsDTO> d
5555
grammar = result.getGrammar().replaceAll("\\$\\{(.*?)}", "\\${testData}");
5656
result.setGrammar(grammar);
5757
result.getData().setTestData(new HashMap<>() {{put(NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA_RECORDER,
58-
allowedValues.equals(NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA) ? "testData" : allowedValues);}});
58+
allowedValues.equals(NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA) ? NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA : allowedValues);}});
5959
}
6060
results.add(result);
6161
}
@@ -65,7 +65,7 @@ default List<NLPTemplateDTO> changeDataToCamelCase(List<NaturalTextActionsDTO> d
6565
default LinkedHashMap<String, String> mapNLPTemplateTestData() {
6666
return new LinkedHashMap<>() {{
6767
put(NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA_RECORDER,
68-
NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA_RECORDER);
68+
NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA);
6969
}};
7070
}
7171

server/src/main/java/com/testsigma/mapper/recorder/TestStepRecorderMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public interface TestStepRecorderMapper {
5555
@Mapping(target = "forLoopStartIndex", source = "testStepRecorderRequest.dataMap.forLoop.startIndex")
5656
@Mapping(target = "forLoopEndIndex", source = "testStepRecorderRequest.dataMap.forLoop.endIndex")
5757
@Mapping(target = "element", expression = "java(mapElement(testStepRecorderRequest))")
58-
@Mapping(target = "attribute", ignore = true)
58+
@Mapping(target = "attribute", source = "testStepRecorderRequest.dataMap.attribute")
5959
@Mapping(target = "addonTestData", source = "kibbutzPluginNlpData.testData")
6060
@Mapping(target = "addonTDF", ignore = true)
6161
@Mapping(target = "addonNaturalTextActionData", ignore = true)

0 commit comments

Comments
 (0)