fix(接口测试): 修复场景执行结果显示了unexecute的缺陷 (#16610)
--bug=1015580 --user=王孝刚 【接口测试】场景执行结果显示了unexecute等2个问题优化 https://www.tapd.cn/55049933/s/1217625 Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
parent
bed9ec92ed
commit
fdfe195587
|
@ -515,6 +515,7 @@ public class ApiAutomationService {
|
||||||
} else {
|
} else {
|
||||||
scenario.setVersionId(request.getVersionId());
|
scenario.setVersionId(request.getVersionId());
|
||||||
}
|
}
|
||||||
|
scenario.setLastResult("");
|
||||||
return scenario;
|
return scenario;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1325,6 +1326,7 @@ public class ApiAutomationService {
|
||||||
scenarioWithBLOBs.setUserId(request.getUserId());
|
scenarioWithBLOBs.setUserId(request.getUserId());
|
||||||
}
|
}
|
||||||
scenarioWithBLOBs.setDescription(request.getDescription());
|
scenarioWithBLOBs.setDescription(request.getDescription());
|
||||||
|
scenarioWithBLOBs.setLastResult("");
|
||||||
|
|
||||||
Boolean openCustomNum = apiTestImportRequest.getOpenCustomNum();
|
Boolean openCustomNum = apiTestImportRequest.getOpenCustomNum();
|
||||||
List<ApiScenario> list = new ArrayList<>();
|
List<ApiScenario> list = new ArrayList<>();
|
||||||
|
|
|
@ -224,6 +224,10 @@
|
||||||
v-else-if="row.lastResult === 'errorReportResult'">
|
v-else-if="row.lastResult === 'errorReportResult'">
|
||||||
{{ $t('error_report_library.option.name') }}
|
{{ $t('error_report_library.option.name') }}
|
||||||
</el-link>
|
</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>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
|
@ -731,6 +735,10 @@ export default {
|
||||||
this.condition.filters = {status: ["Prepare", "Underway", "Completed"]};
|
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
|
// todo
|
||||||
if (projectId != null && typeof projectId === 'string') {
|
if (projectId != null && typeof projectId === 'string') {
|
||||||
this.condition.projectId = projectId;
|
this.condition.projectId = projectId;
|
||||||
|
|
|
@ -3,184 +3,186 @@ import i18n from "@/i18n/i18n";
|
||||||
import {AZURE_DEVOPS, JIRA, LOCAL, TAPD, ZEN_TAO} from "@/common/js/constants";
|
import {AZURE_DEVOPS, JIRA, LOCAL, TAPD, ZEN_TAO} from "@/common/js/constants";
|
||||||
|
|
||||||
export const CUSTOM_FIELD_TYPE_OPTION = [
|
export const CUSTOM_FIELD_TYPE_OPTION = [
|
||||||
{value: 'input', text: 'workspace.custom_filed.input'},
|
{value: 'input', text: 'workspace.custom_filed.input'},
|
||||||
{value: 'textarea', text: 'workspace.custom_filed.textarea'},
|
{value: 'textarea', text: 'workspace.custom_filed.textarea'},
|
||||||
{value: 'select', text: 'workspace.custom_filed.select', hasOption: true},
|
{value: 'select', text: 'workspace.custom_filed.select', hasOption: true},
|
||||||
{value: 'multipleSelect', text: 'workspace.custom_filed.multipleSelect', hasOption: true},
|
{value: 'multipleSelect', text: 'workspace.custom_filed.multipleSelect', hasOption: true},
|
||||||
{value: 'radio', text: 'workspace.custom_filed.radio', hasOption: true},
|
{value: 'radio', text: 'workspace.custom_filed.radio', hasOption: true},
|
||||||
{value: 'checkbox', text: 'workspace.custom_filed.checkbox', hasOption: true},
|
{value: 'checkbox', text: 'workspace.custom_filed.checkbox', hasOption: true},
|
||||||
{value: 'member', text: 'workspace.custom_filed.member', hasOption: true},
|
{value: 'member', text: 'workspace.custom_filed.member', hasOption: true},
|
||||||
{value: 'multipleMember', text: 'workspace.custom_filed.multipleMember', hasOption: true},
|
{value: 'multipleMember', text: 'workspace.custom_filed.multipleMember', hasOption: true},
|
||||||
{value: 'date', text: 'workspace.custom_filed.date'},
|
{value: 'date', text: 'workspace.custom_filed.date'},
|
||||||
{value: 'datetime', text: 'workspace.custom_filed.datetime'},
|
{value: 'datetime', text: 'workspace.custom_filed.datetime'},
|
||||||
{value: 'richText', text: 'workspace.custom_filed.richText'},
|
{value: 'richText', text: 'workspace.custom_filed.richText'},
|
||||||
{value: 'int', text: 'workspace.custom_filed.int'},
|
{value: 'int', text: 'workspace.custom_filed.int'},
|
||||||
{value: 'float', text: 'workspace.custom_filed.float'},
|
{value: 'float', text: 'workspace.custom_filed.float'},
|
||||||
{value: 'multipleInput', text: 'workspace.custom_filed.multipleInput'}
|
{value: 'multipleInput', text: 'workspace.custom_filed.multipleInput'}
|
||||||
];
|
];
|
||||||
|
|
||||||
export function CUSTOM_FIELD_TYPE_FILTERS(_this) {
|
export function CUSTOM_FIELD_TYPE_FILTERS(_this) {
|
||||||
return [
|
return [
|
||||||
{value: 'input', text: _this.$t('workspace.custom_filed.input')},
|
{value: 'input', text: _this.$t('workspace.custom_filed.input')},
|
||||||
{value: 'textarea', text: _this.$t('workspace.custom_filed.textarea')},
|
{value: 'textarea', text: _this.$t('workspace.custom_filed.textarea')},
|
||||||
{value: 'select', text: _this.$t('workspace.custom_filed.select')},
|
{value: 'select', text: _this.$t('workspace.custom_filed.select')},
|
||||||
{value: 'multipleSelect', text: _this.$t('workspace.custom_filed.multipleSelect')},
|
{value: 'multipleSelect', text: _this.$t('workspace.custom_filed.multipleSelect')},
|
||||||
{value: 'radio', text: _this.$t('workspace.custom_filed.radio')},
|
{value: 'radio', text: _this.$t('workspace.custom_filed.radio')},
|
||||||
{value: 'checkbox', text: _this.$t('workspace.custom_filed.checkbox')},
|
{value: 'checkbox', text: _this.$t('workspace.custom_filed.checkbox')},
|
||||||
{value: 'member', text: _this.$t('workspace.custom_filed.member')},
|
{value: 'member', text: _this.$t('workspace.custom_filed.member')},
|
||||||
{value: 'multipleMember', text: _this.$t('workspace.custom_filed.multipleMember')},
|
{value: 'multipleMember', text: _this.$t('workspace.custom_filed.multipleMember')},
|
||||||
{value: 'date', text: _this.$t('workspace.custom_filed.date')},
|
{value: 'date', text: _this.$t('workspace.custom_filed.date')},
|
||||||
{value: 'datetime', text: _this.$t('workspace.custom_filed.datetime')},
|
{value: 'datetime', text: _this.$t('workspace.custom_filed.datetime')},
|
||||||
{value: 'richText', text: _this.$t('workspace.custom_filed.richText')},
|
{value: 'richText', text: _this.$t('workspace.custom_filed.richText')},
|
||||||
{value: 'int', text: _this.$t('workspace.custom_filed.int')},
|
{value: 'int', text: _this.$t('workspace.custom_filed.int')},
|
||||||
{value: 'float', text: _this.$t('workspace.custom_filed.float')},
|
{value: 'float', text: _this.$t('workspace.custom_filed.float')},
|
||||||
{value: 'multipleInput', text: _this.$t('workspace.custom_filed.multipleInput')}
|
{value: 'multipleInput', text: _this.$t('workspace.custom_filed.multipleInput')}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const UI_ELEMENT_LOCATION_TYPE_OPTION = [
|
export const UI_ELEMENT_LOCATION_TYPE_OPTION = [
|
||||||
{value: 'id', text: 'id'},
|
{value: 'id', text: 'id'},
|
||||||
{value: 'name', text: 'name'},
|
{value: 'name', text: 'name'},
|
||||||
{value: 'className', text: 'class'},
|
{value: 'className', text: 'class'},
|
||||||
{value: 'tagName', text: 'tag'},
|
{value: 'tagName', text: 'tag'},
|
||||||
{value: 'linkText', text: 'linkText'},
|
{value: 'linkText', text: 'linkText'},
|
||||||
{value: 'partialLinkText', text: 'plink'},
|
{value: 'partialLinkText', text: 'plink'},
|
||||||
{value: 'css', text: 'css'},
|
{value: 'css', text: 'css'},
|
||||||
{value: 'xpath', text: 'xpath'},
|
{value: 'xpath', text: 'xpath'},
|
||||||
{value: 'label', text: 'label'},
|
{value: 'label', text: 'label'},
|
||||||
{value: 'value', text: 'value'},
|
{value: 'value', text: 'value'},
|
||||||
{value: 'index', text: 'index'},
|
{value: 'index', text: 'index'},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const CUSTOM_FIELD_SCENE_OPTION = [
|
export const CUSTOM_FIELD_SCENE_OPTION = [
|
||||||
{value: 'TEST_CASE', text: 'workspace.case_template_manage'},
|
{value: 'TEST_CASE', text: 'workspace.case_template_manage'},
|
||||||
{value: 'ISSUE', text: 'workspace.issue_template_manage'},
|
{value: 'ISSUE', text: 'workspace.issue_template_manage'},
|
||||||
];
|
];
|
||||||
|
|
||||||
export function CASE_TYPE_OPTION() {
|
export function CASE_TYPE_OPTION() {
|
||||||
return [
|
return [
|
||||||
{value: 'functional', text: i18n.t('api_test.home_page.failed_case_list.table_value.case_type.functional')},
|
{value: 'functional', text: i18n.t('api_test.home_page.failed_case_list.table_value.case_type.functional')},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ISSUE_PLATFORM_OPTION = [
|
export const ISSUE_PLATFORM_OPTION = [
|
||||||
{value: LOCAL, text: 'Metersphere'},
|
{value: LOCAL, text: 'Metersphere'},
|
||||||
{value: TAPD, text: 'Tapd'},
|
{value: TAPD, text: 'Tapd'},
|
||||||
{value: JIRA, text: 'JIRA'},
|
{value: JIRA, text: 'JIRA'},
|
||||||
{value: ZEN_TAO, text: 'Zentao'},
|
{value: ZEN_TAO, text: 'Zentao'},
|
||||||
{value: AZURE_DEVOPS, text: 'Azure Devops'},
|
{value: AZURE_DEVOPS, text: 'Azure Devops'},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const FIELD_TYPE_MAP = {
|
export const FIELD_TYPE_MAP = {
|
||||||
input: 'workspace.custom_filed.input',
|
input: 'workspace.custom_filed.input',
|
||||||
textarea: 'workspace.custom_filed.textarea',
|
textarea: 'workspace.custom_filed.textarea',
|
||||||
select: 'workspace.custom_filed.select',
|
select: 'workspace.custom_filed.select',
|
||||||
multipleSelect: 'workspace.custom_filed.multipleSelect',
|
multipleSelect: 'workspace.custom_filed.multipleSelect',
|
||||||
radio: 'workspace.custom_filed.radio',
|
radio: 'workspace.custom_filed.radio',
|
||||||
checkbox: 'workspace.custom_filed.checkbox',
|
checkbox: 'workspace.custom_filed.checkbox',
|
||||||
member: 'workspace.custom_filed.member',
|
member: 'workspace.custom_filed.member',
|
||||||
multipleMember: 'workspace.custom_filed.multipleMember',
|
multipleMember: 'workspace.custom_filed.multipleMember',
|
||||||
date: 'workspace.custom_filed.date',
|
date: 'workspace.custom_filed.date',
|
||||||
datetime: 'workspace.custom_filed.datetime',
|
datetime: 'workspace.custom_filed.datetime',
|
||||||
richText: 'workspace.custom_filed.richText',
|
richText: 'workspace.custom_filed.richText',
|
||||||
int: 'workspace.custom_filed.int',
|
int: 'workspace.custom_filed.int',
|
||||||
float: 'workspace.custom_filed.float',
|
float: 'workspace.custom_filed.float',
|
||||||
multipleInput: 'workspace.custom_filed.multipleInput'
|
multipleInput: 'workspace.custom_filed.multipleInput'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SCENE_MAP = {
|
export const SCENE_MAP = {
|
||||||
ISSUE: 'workspace.issue_template_manage',
|
ISSUE: 'workspace.issue_template_manage',
|
||||||
TEST_CASE: 'workspace.case_template_manage',
|
TEST_CASE: 'workspace.case_template_manage',
|
||||||
PLAN: 'workstation.table_name.track_plan'
|
PLAN: 'workstation.table_name.track_plan'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SYSTEM_FIELD_NAME_MAP = {
|
export const SYSTEM_FIELD_NAME_MAP = {
|
||||||
//用例字段
|
//用例字段
|
||||||
用例状态: 'custom_field.case_status',
|
用例状态: 'custom_field.case_status',
|
||||||
责任人: 'custom_field.case_maintainer',
|
责任人: 'custom_field.case_maintainer',
|
||||||
用例等级: 'custom_field.case_priority',
|
用例等级: 'custom_field.case_priority',
|
||||||
//缺陷字段
|
//缺陷字段
|
||||||
创建人: 'custom_field.issue_creator',
|
创建人: 'custom_field.issue_creator',
|
||||||
处理人: 'custom_field.issue_processor',
|
处理人: 'custom_field.issue_processor',
|
||||||
状态: 'custom_field.issue_status',
|
状态: 'custom_field.issue_status',
|
||||||
严重程度: 'custom_field.issue_severity',
|
严重程度: 'custom_field.issue_severity',
|
||||||
// 测试计划
|
// 测试计划
|
||||||
测试阶段: 'test_track.plan.plan_stage'
|
测试阶段: 'test_track.plan.plan_stage'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const ISSUE_STATUS_MAP = {
|
export const ISSUE_STATUS_MAP = {
|
||||||
'new': i18n.t('test_track.issue.status_new'),
|
'new': i18n.t('test_track.issue.status_new'),
|
||||||
'closed': i18n.t('test_track.issue.status_closed'),
|
'closed': i18n.t('test_track.issue.status_closed'),
|
||||||
'resolved': i18n.t('test_track.issue.status_resolved'),
|
'resolved': i18n.t('test_track.issue.status_resolved'),
|
||||||
'active': i18n.t('test_track.issue.status_active'),
|
'active': i18n.t('test_track.issue.status_active'),
|
||||||
'delete': i18n.t('test_track.issue.status_delete'),
|
'delete': i18n.t('test_track.issue.status_delete'),
|
||||||
'created': i18n.t('test_track.issue.status_new')
|
'created': i18n.t('test_track.issue.status_new')
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TAPD_ISSUE_STATUS_MAP = {
|
export const TAPD_ISSUE_STATUS_MAP = {
|
||||||
'new': i18n.t('test_track.issue.tapd_status_new'),
|
'new': i18n.t('test_track.issue.tapd_status_new'),
|
||||||
'in_progress': i18n.t('test_track.issue.tapd_status_in_progress'),
|
'in_progress': i18n.t('test_track.issue.tapd_status_in_progress'),
|
||||||
'reopened': i18n.t('test_track.issue.tapd_status_reopened'),
|
'reopened': i18n.t('test_track.issue.tapd_status_reopened'),
|
||||||
'rejected': i18n.t('test_track.issue.tapd_status_rejected'),
|
'rejected': i18n.t('test_track.issue.tapd_status_rejected'),
|
||||||
'verified': i18n.t('test_track.issue.tapd_status_verified'),
|
'verified': i18n.t('test_track.issue.tapd_status_verified'),
|
||||||
'closed': i18n.t('test_track.issue.tapd_status_closed'),
|
'closed': i18n.t('test_track.issue.tapd_status_closed'),
|
||||||
'resolved': i18n.t('test_track.issue.tapd_status_resolved')
|
'resolved': i18n.t('test_track.issue.tapd_status_resolved')
|
||||||
}
|
}
|
||||||
|
|
||||||
export function API_SCENARIO_FILTERS() {
|
export function API_SCENARIO_FILTERS() {
|
||||||
return {
|
return {
|
||||||
STATUS_FILTERS: [
|
STATUS_FILTERS: [
|
||||||
{text: i18n.t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
|
{text: i18n.t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
|
||||||
{text: i18n.t('test_track.plan.plan_status_running'), value: 'Underway'},
|
{text: i18n.t('test_track.plan.plan_status_running'), value: 'Underway'},
|
||||||
{text: i18n.t('test_track.plan.plan_status_completed'), value: 'Completed'},
|
{text: i18n.t('test_track.plan.plan_status_completed'), value: 'Completed'},
|
||||||
],
|
],
|
||||||
TRASH_FILTERS: [
|
TRASH_FILTERS: [
|
||||||
{text: i18n.t('test_track.plan.plan_status_trash'), value: 'Trash'},
|
{text: i18n.t('test_track.plan.plan_status_trash'), value: 'Trash'},
|
||||||
],
|
],
|
||||||
|
|
||||||
LEVEL_FILTERS: [
|
LEVEL_FILTERS: [
|
||||||
|
{text: 'P0', value: 'P0'},
|
||||||
|
{text: 'P1', value: 'P1'},
|
||||||
|
{text: 'P2', value: 'P2'},
|
||||||
|
{text: 'P3', value: 'P3'}
|
||||||
|
],
|
||||||
|
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.home_page.detail_card.unexecute'), value: 'unexecute'},
|
||||||
|
{text: i18n.t('error_report_library.option.name'), value: 'errorReportResult'}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
/*LEVEL_FILTERS: [
|
||||||
{text: 'P0', value: 'P0'},
|
{text: 'P0', value: 'P0'},
|
||||||
{text: 'P1', value: 'P1'},
|
{text: 'P1', value: 'P1'},
|
||||||
{text: 'P2', value: 'P2'},
|
{text: 'P2', value: 'P2'},
|
||||||
{text: 'P3', value: 'P3'}
|
{text: 'P3', value: 'P3'}
|
||||||
],
|
];
|
||||||
RESULT_FILTERS: [
|
RESULT_FILTERS: [
|
||||||
{text: i18n.t('api_test.automation.fail'), value: 'Fail'},
|
{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'}
|
||||||
]
|
];*/
|
||||||
};
|
|
||||||
/*LEVEL_FILTERS: [
|
|
||||||
{text: 'P0', value: 'P0'},
|
|
||||||
{text: 'P1', value: 'P1'},
|
|
||||||
{text: 'P2', value: 'P2'},
|
|
||||||
{text: 'P3', value: 'P3'}
|
|
||||||
];
|
|
||||||
RESULT_FILTERS: [
|
|
||||||
{text: i18n.t('api_test.automation.fail'), value: 'Fail'},
|
|
||||||
{text: i18n.t('api_test.automation.success'), value: 'Success'}
|
|
||||||
];*/
|
|
||||||
|
|
||||||
/*STATUS_FILTERS: [
|
/*STATUS_FILTERS: [
|
||||||
{text: i18n.t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
|
{text: i18n.t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
|
||||||
{text: i18n.t('test_track.plan.plan_status_running'), value: 'Underway'},
|
{text: i18n.t('test_track.plan.plan_status_running'), value: 'Underway'},
|
||||||
{text: i18n.t('test_track.plan.plan_status_completed'), value: 'Completed'},
|
{text: i18n.t('test_track.plan.plan_status_completed'), value: 'Completed'},
|
||||||
{text: i18n.t('test_track.plan.plan_status_trash'), value: 'Trash'},
|
{text: i18n.t('test_track.plan.plan_status_trash'), value: 'Trash'},
|
||||||
],*/
|
],*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const USER_GROUP_SCOPE = {
|
export const USER_GROUP_SCOPE = {
|
||||||
'SYSTEM': 'group.system',
|
'SYSTEM': 'group.system',
|
||||||
'WORKSPACE': 'group.workspace',
|
'WORKSPACE': 'group.workspace',
|
||||||
'PROJECT': 'group.project',
|
'PROJECT': 'group.project',
|
||||||
'PERSONAL': 'group.personal'
|
'PERSONAL': 'group.personal'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PROJECT_GROUP_SCOPE = {
|
export const PROJECT_GROUP_SCOPE = {
|
||||||
'TRACK': 'permission.other.track',
|
'TRACK': 'permission.other.track',
|
||||||
'API': 'permission.other.api',
|
'API': 'permission.other.api',
|
||||||
'UI': 'permission.other.ui',
|
'UI': 'permission.other.ui',
|
||||||
'PERFORMANCE': 'permission.other.performance',
|
'PERFORMANCE': 'permission.other.performance',
|
||||||
'REPORT': 'permission.other.report'
|
'REPORT': 'permission.other.report'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue