fix(测试计划): 用例执行顺序修复
This commit is contained in:
parent
3f332ec42d
commit
dba9884850
|
@ -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)"
|
||||||
>
|
>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue