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)) { if (object.has(MINLENGTH)) {
minLength = object.get(MINLENGTH).getAsInt(); 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); Object enumObj = analyzeEnumProperty(object);
String v = enumObj == null ? "" : String.valueOf(enumObj); String v = enumObj == null ? "" : String.valueOf(enumObj);
value = StringUtils.isNotBlank(v) ? v : value; value = StringUtils.isNotBlank(v) ? v : value;

View File

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