Skip to content

Commit

Permalink
fix(测试计划&接口测试): 修改测试计划用例详情缺陷缺陷控制&接口测试报告缺少提取补充
Browse files Browse the repository at this point in the history
  • Loading branch information
fit2cloudwxx authored and liuruibin committed May 23, 2024
1 parent 58f9137 commit 288b1e1
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,14 @@
label: t('apiTestDebug.console'),
value: ResponseComposition.CONSOLE,
},
...(props.isDefinition
? [
{
label: t('apiTestDebug.extract'),
value: ResponseComposition.EXTRACT,
},
{
label: t('apiTestDebug.assertion'),
value: ResponseComposition.ASSERTION,
},
]
: []),
{
label: t('apiTestDebug.extract'),
value: ResponseComposition.EXTRACT,
},
{
label: t('apiTestDebug.assertion'),
value: ResponseComposition.ASSERTION,
},
];
const activeTab = ref(ResponseComposition.BODY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<ResValueScript :active-tab="item.value" :request-result="props.requestResult" />
</div>
<div v-if="!expandIds.includes(item.value) && item.value === ResponseComposition.EXTRACT">
<ResValueScript :active-tab="item.value" :request-result="props.requestResult" />
<ExtractTable :request-result="props.requestResult" :scroll="{ x: '100%' }" />
</div>
<div v-if="!expandIds.includes(item.value) && item.value === ResponseComposition.ASSERTION">
<ResAssertion :request-result="props.requestResult" />
Expand All @@ -65,6 +65,7 @@
import ResBody from './body.vue';
import ResConsole from './console.vue';
import ResValueScript from './resValueScript.vue';
import ExtractTable from '@/views/api-test/components/requestComposition/response/result/extractTable.vue';
import { useI18n } from '@/hooks/useI18n';
Expand Down Expand Up @@ -109,7 +110,7 @@
const showRealRequest = computed(
() => props.requestResult?.responseResult?.headers.trim() || props.requestResult?.url || props.requestResult?.body
);
const showExtract = computed(() => props.requestResult?.responseResult?.vars?.trim());
const showExtract = computed(() => (props.requestResult?.responseResult?.extractResults || []).length);
function isShowContent(key: keyof typeof ResponseComposition) {
switch (key) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@

<a-button
v-if="hasAnyPermission(['SYSTEM_SERVICE_INTEGRATION:READ+DELETE']) && item.config"
v-permission="['SYSTEM_SERVICE_INTEGRATION:READ+DELETE']"
type="outline"
class="arco-btn-outline--secondary"
size="mini"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@
<a-divider direction="vertical" :margin="8"></a-divider>
</div>
<div
v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+ADD']) && record.functionalCaseCount < 1"
v-if="
hasAnyPermission(['PROJECT_TEST_PLAN:READ+ADD']) &&
record.functionalCaseCount < 1 &&
record.status !== 'ARCHIVED'
"
class="flex items-center"
>
<MsButton class="!mx-0" @click="emit('editOrCopy', record.id, true)">{{ t('common.copy') }}</MsButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<div class="mb-4 flex items-center justify-between">
<a-dropdown-button
v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+UPDATE']) && total"
v-if="hasAnyPermission(['PROJECT_BUG:READ']) && total"
type="primary"
@click="handleSelect('associated')"
>
Expand All @@ -11,13 +11,13 @@
<icon-down />
</template>
<template #content>
<a-doption value="new" @click="handleSelect('new')">
<a-doption v-permission="['PROJECT_BUG:READ+ADD']" value="new" @click="handleSelect('new')">
{{ t('common.newCreate') }}
</a-doption>
</template>
</a-dropdown-button>
<a-dropdown-button
v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+UPDATE']) && !total"
v-if="hasAnyPermission(['PROJECT_BUG:READ+ADD']) && !total"
type="primary"
@click="handleSelect('new')"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,19 @@
<template #icon> <icon-plus class="text-[12px]" /> </template>
</a-button>
<template #content>
<a-doption value="new">{{ t('common.newCreate') }}</a-doption>
<a-doption v-if="createdBugCount > 0" value="link">{{ t('common.associated') }}</a-doption>
<a-doption v-permission="['PROJECT_BUG:READ+ADD']" value="new">{{
t('common.newCreate')
}}</a-doption>
<a-doption v-if="createdBugCount > 0 && hasAnyPermission(['PROJECT_BUG:READ'])" value="link">{{
t('common.associated')
}}</a-doption>
<a-popover v-else title="" position="left">
<a-doption :disabled="true" value="link">{{ t('common.associated') }}</a-doption>
<a-doption
v-if="createdBugCount < 1 && hasAnyPermission(['PROJECT_BUG:READ'])"
:disabled="true"
value="link"
>{{ t('common.associated') }}</a-doption
>
<template #content>
<div class="flex items-center text-[14px]">
<span class="text-[var(--color-text-4)]">{{
Expand Down

0 comments on commit 288b1e1

Please sign in to comment.