提交 d5584dd8 编写于 作者: F fit2-zhao 提交者: BugKing

fix(场景自动化): 修复JSONSchema integer取值问题;优化步骤删除时抖动问题。

上级 3fa46bd7
......@@ -150,8 +150,13 @@ public class JSONSchemaGenerator {
concept.put(propertyName, object.get("default"));
}
if (object.has("mock") && object.get("mock").getAsJsonObject() != null && StringUtils.isNotEmpty(object.get("mock").getAsJsonObject().get("mock").getAsString())) {
String value = ScriptEngineUtils.calculate(object.get("mock").getAsJsonObject().get("mock").toString());
concept.put(propertyName, value);
try {
int value = object.get("mock").getAsJsonObject().get("mock").getAsInt();
concept.put(propertyName, value);
} catch (Exception e) {
String value = ScriptEngineUtils.calculate(object.get("mock").getAsJsonObject().get("mock").getAsString());
concept.put(propertyName, value);
}
}
if (object.has("multipleOf")) {
......
......@@ -621,7 +621,6 @@
recursiveSorting(arr, scenarioProjectId) {
for (let i in arr) {
arr[i].index = Number(i) + 1;
arr[i].active = this.expandedStatus;
if (arr[i].type === ELEMENT_TYPE.LoopController && arr[i].loopType === "LOOP_COUNT" && arr[i].hashTree && arr[i].hashTree.length > 1) {
arr[i].countController.proceed = true;
}
......@@ -648,7 +647,6 @@
for (let i in this.scenarioDefinition) {
// 排序
this.scenarioDefinition[i].index = Number(i) + 1;
this.scenarioDefinition[i].active = this.expandedStatus;
// 设置循环控制
if (this.scenarioDefinition[i].type === ELEMENT_TYPE.LoopController && this.scenarioDefinition[i].hashTree
&& this.scenarioDefinition[i].hashTree.length > 1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册