fix(测试计划): 用例执行顺序修复

This commit is contained in:
baiqi 2024-08-19 15:49:54 +08:00 committed by Craftsman
parent 3f332ec42d
commit dba9884850
2 changed files with 5 additions and 1 deletions

View File

@ -76,6 +76,7 @@
v-if="hasAnyPermission(['PROJECT_API_SCENARIO:READ+UPDATE'])" v-if="hasAnyPermission(['PROJECT_API_SCENARIO:READ+UPDATE'])"
v-model:model-value="record.priority" v-model:model-value="record.priority"
:placeholder="t('common.pleaseSelect')" :placeholder="t('common.pleaseSelect')"
size="small"
class="param-input w-full" class="param-input w-full"
@change="() => handlePriorityStatusChange(record)" @change="() => handlePriorityStatusChange(record)"
> >

View File

@ -467,12 +467,13 @@
}); });
const autoNext = ref(true); const autoNext = ref(true);
async function executeDone(status: LastExecuteResults) { async function executeDone(status: LastExecuteResults) {
caseDetail.value.lastExecuteResult = status;
if (autoNext.value) { if (autoNext.value) {
// id // id
const index = caseList.value.findIndex((e) => e.id === activeId.value); const index = caseList.value.findIndex((e) => e.id === activeId.value);
// //
const oneMissingCase = lastExecResult.value.length && !lastExecResult.value.includes(status); const oneMissingCase = lastExecResult.value?.length && !lastExecResult.value.includes(status);
if (oneMissingCase) { if (oneMissingCase) {
if ((pageNation.value.current - 1) * pageNation.value.pageSize + index + 1 < pageNation.value.total) { if ((pageNation.value.current - 1) * pageNation.value.pageSize + index + 1 < pageNation.value.total) {
// //
@ -570,6 +571,7 @@
showLinkDrawer.value = false; showLinkDrawer.value = false;
loadBugListAndCaseDetail(); loadBugListAndCaseDetail();
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console
console.log(error); console.log(error);
} finally { } finally {
drawerLoading.value = false; drawerLoading.value = false;
@ -642,6 +644,7 @@
testPlanId: route.query.id as string, testPlanId: route.query.id as string,
}); });
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console
console.log(error); console.log(error);
} finally { } finally {
executeLoading.value = false; executeLoading.value = false;