fix(接口测试): 修复场景执行结果显示了unexecute的缺陷 (#16609)

--bug=1015580 --user=王孝刚 【接口测试】场景执行结果显示了unexecute等2个问题优化
https://www.tapd.cn/55049933/s/1217625

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-08-02 18:38:10 +08:00 committed by GitHub
parent 393a829855
commit 1862bd1084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 142 additions and 130 deletions

View File

@ -515,6 +515,7 @@ public class ApiAutomationService {
} else {
scenario.setVersionId(request.getVersionId());
}
scenario.setLastResult("");
return scenario;
}
@ -1325,6 +1326,7 @@ public class ApiAutomationService {
scenarioWithBLOBs.setUserId(request.getUserId());
}
scenarioWithBLOBs.setDescription(request.getDescription());
scenarioWithBLOBs.setLastResult("");
Boolean openCustomNum = apiTestImportRequest.getOpenCustomNum();
List<ApiScenario> list = new ArrayList<>();

View File

@ -224,6 +224,10 @@
v-else-if="row.lastResult === 'errorReportResult'">
{{ $t('error_report_library.option.name') }}
</el-link>
<el-link type="danger" style="color: #7F7F7F" :disabled="true"
v-else-if="row.lastResult === 'unexecute' || row.lastResult === ''">
{{ $t('api_test.home_page.detail_card.unexecute') }}
</el-link>
</template>
</ms-table-column>
@ -731,6 +735,10 @@ export default {
this.condition.filters = {status: ["Prepare", "Underway", "Completed"]};
}
if (this.condition.filters.last_result && this.condition.filters.last_result.indexOf('unexecute') !== -1) {
this.condition.filters.last_result.push('');
}
// todo
if (projectId != null && typeof projectId === 'string') {
this.condition.projectId = projectId;

View File

@ -147,7 +147,9 @@ export function API_SCENARIO_FILTERS() {
],
RESULT_FILTERS: [
{text: i18n.t('api_test.automation.fail'), value: 'Fail'},
{text: i18n.t('api_test.automation.success'), value: 'Success'}
{text: i18n.t('api_test.automation.success'), value: 'Success'},
{text: i18n.t('api_test.home_page.detail_card.unexecute'), value: 'unexecute'},
{text: i18n.t('error_report_library.option.name'), value: 'errorReportResult'}
]
};
/*LEVEL_FILTERS: [