Skip to content

Commit

Permalink
TOS-897 Some data level changes for recorder
Browse files Browse the repository at this point in the history
  • Loading branch information
tarun-testsigma committed Nov 26, 2022
1 parent e83b0fe commit 91adb1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions server/src/main/java/com/testsigma/dto/TestStepDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ public TestStepRecorderDataMap mapTestData() {
if(toElement != null) {
testStepDataMap.setToUiIdentifier(toElement);
}
if(attribute != null) {
testStepDataMap.setAttribute(attribute);
}
if(ifConditionExpectedResults.length > 0) {
testStepDataMap.setIfConditionExpectedResults(ifConditionExpectedResults);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ default List<NLPTemplateDTO> changeDataToCamelCase(List<NaturalTextActionsDTO> d
grammar = result.getGrammar().replaceAll("\\$\\{(.*?)}", "\\${testData}");
result.setGrammar(grammar);
result.getData().setTestData(new HashMap<>() {{put(NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA_RECORDER,
allowedValues.equals(NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA) ? "testData" : allowedValues);}});
allowedValues.equals(NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA) ? NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA : allowedValues);}});
}
results.add(result);
}
Expand All @@ -65,7 +65,7 @@ default List<NLPTemplateDTO> changeDataToCamelCase(List<NaturalTextActionsDTO> d
default LinkedHashMap<String, String> mapNLPTemplateTestData() {
return new LinkedHashMap<>() {{
put(NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA_RECORDER,
NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA_RECORDER);
NaturalTextActionConstants.TEST_STEP_DATA_MAP_KEY_TEST_DATA);
}};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public interface TestStepRecorderMapper {
@Mapping(target = "forLoopStartIndex", source = "testStepRecorderRequest.dataMap.forLoop.startIndex")
@Mapping(target = "forLoopEndIndex", source = "testStepRecorderRequest.dataMap.forLoop.endIndex")
@Mapping(target = "element", expression = "java(mapElement(testStepRecorderRequest))")
@Mapping(target = "attribute", ignore = true)
@Mapping(target = "attribute", source = "testStepRecorderRequest.dataMap.attribute")
@Mapping(target = "addonTestData", source = "kibbutzPluginNlpData.testData")
@Mapping(target = "addonTDF", ignore = true)
@Mapping(target = "addonNaturalTextActionData", ignore = true)
Expand Down

0 comments on commit 91adb1b

Please sign in to comment.