fix(接口测试): 修复另存为新用例造成浏览器没反应的缺陷

This commit is contained in:
wxg0103 2023-03-24 18:57:57 +08:00 committed by fit2-zhao
parent 0b0328aa27
commit e0ef45198d
2 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ public class TestDataGenerator {
if (object.has(MINLENGTH)) {
minLength = object.get(MINLENGTH).getAsInt();
}
String value = RandomStringUtils.randomAlphanumeric(minLength, maxLength);
String value = minLength > maxLength ? mockValue.toString() : RandomStringUtils.randomAlphanumeric(minLength, maxLength);
Object enumObj = analyzeEnumProperty(object);
String v = enumObj == null ? "" : String.valueOf(enumObj);
value = StringUtils.isNotBlank(v) ? v : value;
@ -174,7 +174,7 @@ public class TestDataGenerator {
} catch (Exception e) {
return value;
}
}
}
public static Object analyzeInteger(JsonObject object) {
// 先设置空值

View File

@ -58,7 +58,7 @@ export default {
};
},
watch: {
schema: {
"schema.type": {
handler() {
this.schema.mock = this.mock;
},