fix(场景自动化): 修复JSONSchema integer取值问题;优化步骤删除时抖动问题。
This commit is contained in:
parent
b6edbd9dfe
commit
75f46c6c66
|
@ -150,8 +150,13 @@ public class JSONSchemaGenerator {
|
||||||
concept.put(propertyName, object.get("default"));
|
concept.put(propertyName, object.get("default"));
|
||||||
}
|
}
|
||||||
if (object.has("mock") && object.get("mock").getAsJsonObject() != null && StringUtils.isNotEmpty(object.get("mock").getAsJsonObject().get("mock").getAsString())) {
|
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());
|
try {
|
||||||
concept.put(propertyName, value);
|
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")) {
|
if (object.has("multipleOf")) {
|
||||||
|
|
||||||
|
|
|
@ -621,7 +621,6 @@
|
||||||
recursiveSorting(arr, scenarioProjectId) {
|
recursiveSorting(arr, scenarioProjectId) {
|
||||||
for (let i in arr) {
|
for (let i in arr) {
|
||||||
arr[i].index = Number(i) + 1;
|
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) {
|
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;
|
arr[i].countController.proceed = true;
|
||||||
}
|
}
|
||||||
|
@ -648,7 +647,6 @@
|
||||||
for (let i in this.scenarioDefinition) {
|
for (let i in this.scenarioDefinition) {
|
||||||
// 排序
|
// 排序
|
||||||
this.scenarioDefinition[i].index = Number(i) + 1;
|
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
|
if (this.scenarioDefinition[i].type === ELEMENT_TYPE.LoopController && this.scenarioDefinition[i].hashTree
|
||||||
&& this.scenarioDefinition[i].hashTree.length > 1) {
|
&& this.scenarioDefinition[i].hashTree.length > 1) {
|
||||||
|
|
Loading…
Reference in New Issue