fix(接口测试): 修复刷新页面,列表显示问题
--bug=1026638 --user=王孝刚 【接口测试】接口列表-切换http/tcp/sql/dubbo-刷新页面-列表显示问题 https://www.tapd.cn/55049933/s/1387865
This commit is contained in:
parent
77171bd45e
commit
f845c967c3
|
@ -738,7 +738,7 @@ public class ElementUtil {
|
|||
variables.stream()
|
||||
.filter(ScenarioVariable::isConstantValid).forEach(keyValue ->
|
||||
arguments.addArgument(keyValue.getName(),
|
||||
keyValue.getValue(), "="));
|
||||
keyValue.getValue().replaceAll("[\r\n]",""), "="));
|
||||
List<ScenarioVariable> variableList = variables.stream()
|
||||
.filter(ScenarioVariable::isListValid).collect(Collectors.toList());
|
||||
variableList.forEach(item -> {
|
||||
|
@ -761,7 +761,7 @@ public class ElementUtil {
|
|||
arguments.addArgument(keyValue.getName(),
|
||||
keyValue.getValue() != null && keyValue.getValue().startsWith("@")
|
||||
? ScriptEngineUtils.buildFunctionCallString(keyValue.getValue())
|
||||
: keyValue.getValue(), "="));
|
||||
: keyValue.getValue().replaceAll("[\r\n]",""), "="));
|
||||
// List类型的变量
|
||||
List<ScenarioVariable> variableList = config.getConfig().get(projectId).getCommonConfig().getVariables().stream()
|
||||
.filter(ScenarioVariable::isListValid)
|
||||
|
|
|
@ -375,7 +375,7 @@ export default {
|
|||
selectDataRange: 'all',
|
||||
showCasePage: true,
|
||||
apiDefaultTab: 'default',
|
||||
currentProtocol: 'HTTP',
|
||||
currentProtocol: '',
|
||||
currentModule: null,
|
||||
selectNodeIds: [],
|
||||
currentApi: {},
|
||||
|
@ -481,6 +481,11 @@ export default {
|
|||
this.isAsideHidden = this.apiDefaultTab === 'default' || this.apiDefaultTab === 'trash';
|
||||
},
|
||||
},
|
||||
beforeCreate() {
|
||||
getUserDefaultApiType().then(response => {
|
||||
this.currentProtocol = response.data;
|
||||
})
|
||||
},
|
||||
created() {
|
||||
let routeParamObj = this.$route.params;
|
||||
if (routeParamObj) {
|
||||
|
@ -507,9 +512,6 @@ export default {
|
|||
this.activeDom = 'middle';
|
||||
}
|
||||
}
|
||||
getUserDefaultApiType().then(response => {
|
||||
this.currentProtocol = response.data;
|
||||
})
|
||||
this.getEnv();
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -867,7 +867,7 @@ export default {
|
|||
},
|
||||
refreshTable() {
|
||||
this.initTableCondition();
|
||||
if (this.condition.projectId) {
|
||||
if (this.condition.projectId && this.condition.protocol) {
|
||||
this.result = getDefinitionPage(this.currentPage, this.pageSize, this.condition).then((response) => {
|
||||
getProtocolFilter(this.condition.protocol);
|
||||
this.total = response.data.itemCount;
|
||||
|
@ -881,7 +881,7 @@ export default {
|
|||
},
|
||||
initTable(currentProtocol) {
|
||||
this.initTableCondition(currentProtocol);
|
||||
if (this.condition.projectId) {
|
||||
if (this.condition.projectId && this.condition.protocol) {
|
||||
this.result = getDefinitionPage(this.currentPage, this.pageSize, this.condition).then((response) => {
|
||||
getProtocolFilter(this.condition.protocol);
|
||||
this.total = response.data.itemCount;
|
||||
|
|
|
@ -78,7 +78,7 @@ export default {
|
|||
result: false,
|
||||
refreshDataOver: true,
|
||||
condition: {
|
||||
protocol: OPTIONS[0].value,
|
||||
protocol: '',
|
||||
filterText: '',
|
||||
trashEnable: false,
|
||||
},
|
||||
|
@ -245,10 +245,12 @@ export default {
|
|||
this.setData(response);
|
||||
});
|
||||
} else {
|
||||
if (this.condition.protocol) {
|
||||
this.result = postApiModules(projectId, this.condition.protocol, this.currentVersion, this.param).then((response) => {
|
||||
this.setData(response);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
setNohupData(response, selectNodeId) {
|
||||
if (response.data != undefined && response.data != null) {
|
||||
|
|
|
@ -283,8 +283,6 @@ public class JSONPathAssertion extends AbstractTestElement implements Serializab
|
|||
try {
|
||||
Number number1 = NumberUtils.createBigDecimal(v1);
|
||||
Number number2 = NumberUtils.createBigDecimal(v2);
|
||||
log.info("number1: " + number1 + " number2: " + number2);
|
||||
log.info("number1.equals(number2): " + number1.equals(number2));
|
||||
return number1.equals(number2);
|
||||
} catch (Exception e) {
|
||||
return StringUtils.equals(v1, v2);
|
||||
|
|
Loading…
Reference in New Issue