refactor(接口测试): 优化场景断言置顶的方法

This commit is contained in:
wxg0103 2022-05-18 14:53:54 +08:00 committed by 刘瑞斌
parent c4e4ad46b6
commit 731db1fb90
1 changed files with 10 additions and 1 deletions

View File

@ -1141,11 +1141,20 @@ export default {
if (item.type === type) {
item.active = true;
isAssertions = true;
return;
this.reloadTree = getUUID();
}
})
if (!isAssertions) {
setComponent(type, this, plugin);
for (let i in this.scenarioDefinition) {
if (this.scenarioDefinition[i].type === "Assertions") {
this.scenarioDefinition[i].active = true;
let assertions = this.scenarioDefinition[i];
this.scenarioDefinition.splice(i, 1);
this.scenarioDefinition.unshift(assertions);
this.sort();
}
}
}
} else {
setComponent(type, this, plugin);