diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue
index c7d97b967e..acac20e6d1 100644
--- a/frontend/src/components/pure/ms-table/base-table.vue
+++ b/frontend/src/components/pure/ms-table/base-table.vue
@@ -51,7 +51,7 @@
v-model:model-value="record.tableChecked"
@change="(val) => handleRadioChange(val as boolean, record)"
/>
-
+
0;
+ return item.children && item.children.length > 0 && item.status && item.status !== 'PENDING';
}
function handleStop(event: Event, step: ScenarioItemType) {
diff --git a/frontend/src/views/api-test/report/component/stepProgress.vue b/frontend/src/views/api-test/report/component/stepProgress.vue
index a914554eed..17e138bc50 100644
--- a/frontend/src/views/api-test/report/component/stepProgress.vue
+++ b/frontend/src/views/api-test/report/component/stepProgress.vue
@@ -89,11 +89,11 @@
color: 'rgb(var(--success-6))',
},
{
- percentage: (props.reportDetail.stepFakeErrorCount / getCountTotal.value) * 100,
+ percentage: (props.reportDetail.stepErrorCount / getCountTotal.value) * 100,
color: 'rgb(var(--danger-6))',
},
{
- percentage: (props.reportDetail.stepErrorCount / getCountTotal.value) * 100,
+ percentage: (props.reportDetail.stepFakeErrorCount / getCountTotal.value) * 100,
color: 'rgb(var(--warning-6))',
},
{
diff --git a/frontend/src/views/api-test/scenario/create/index.vue b/frontend/src/views/api-test/scenario/create/index.vue
index c7d9eba1d3..053dbfd0ac 100644
--- a/frontend/src/views/api-test/scenario/create/index.vue
+++ b/frontend/src/views/api-test/scenario/create/index.vue
@@ -35,15 +35,24 @@
v-model:pre-processor-config="scenario.scenarioConfig.preProcessorConfig"
/>
-
+
+
+
+
{{ t('apiScenario.assertion') }}
+
+
+
+
{
+ return scenario.value.scenarioConfig.assertionConfig.assertions.length > 99
+ ? '99+'
+ : `${scenario.value.scenarioConfig.assertionConfig.assertions.length}` || '';
+ });
+
defineExpose({
validScenarioForm,
});
@@ -182,4 +197,10 @@
padding: 8px 16px;
}
}
+ :deep(.active-badge) {
+ .arco-badge-text,
+ .arco-badge-number {
+ background-color: rgb(var(--primary-5));
+ }
+ }
diff --git a/frontend/src/views/project-management/environmental/components/EnvParamBox.vue b/frontend/src/views/project-management/environmental/components/EnvParamBox.vue
index 7015a3eb0b..e8f01fed88 100644
--- a/frontend/src/views/project-management/environmental/components/EnvParamBox.vue
+++ b/frontend/src/views/project-management/environmental/components/EnvParamBox.vue
@@ -32,30 +32,27 @@
/>
-
-
-
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
-
+
();
- const activeKey = ref('envParams');
+ const activeKey = ref(EnvTabTypeEnum.ENVIRONMENT_PARAM);
const envForm = ref();
const { t } = useI18n();
const loading = ref(false);
@@ -136,46 +135,55 @@
const contentTabList = ref([]);
const isDisabled = computed(() => !hasAnyPermission(['PROJECT_ENVIRONMENT:READ+UPDATE']));
+ const settingList = [
+ {
+ value: EnvTabTypeEnum.ENVIRONMENT_SETTING,
+ label: t('project.environmental.displaySetting'),
+ canHide: false,
+ isShow: true,
+ },
+ ];
+
const sourceTabList = [
{
- value: 'envParams',
- label: 'project.environmental.envParams',
+ value: EnvTabTypeEnum.ENVIRONMENT_PARAM,
+ label: t('project.environmental.envParams'),
canHide: false,
isShow: true,
},
{
- value: 'http',
- label: 'project.environmental.HTTP',
+ value: EnvTabTypeEnum.ENVIRONMENT_HTTP,
+ label: t('project.environmental.HTTP'),
canHide: true,
isShow: true,
},
{
- value: 'database',
- label: 'project.environmental.database',
+ value: EnvTabTypeEnum.ENVIRONMENT_DATABASE,
+ label: t('project.environmental.database'),
canHide: true,
isShow: true,
},
{
- value: 'host',
- label: 'project.environmental.HOST',
+ value: EnvTabTypeEnum.ENVIRONMENT_HOST,
+ label: t('project.environmental.HOST'),
canHide: true,
isShow: true,
},
{
- value: 'pre',
- label: 'project.environmental.pre',
+ value: EnvTabTypeEnum.ENVIRONMENT_PRE,
+ label: t('project.environmental.pre'),
canHide: true,
isShow: true,
},
{
- value: 'post',
- label: 'project.environmental.post',
+ value: EnvTabTypeEnum.ENVIRONMENT_POST,
+ label: t('project.environmental.post'),
canHide: true,
isShow: true,
},
{
- value: 'assert',
- label: 'project.environmental.assert',
+ value: EnvTabTypeEnum.ENVIRONMENT_ASSERT,
+ label: t('project.environmental.assert'),
canHide: true,
isShow: true,
},
@@ -191,7 +199,7 @@
}
};
await initPlugin();
- await store.initContentTabList([...sourceTabList, ...pluginTabList.value]);
+ await store.initContentTabList([...sourceTabList, ...pluginTabList.value, ...settingList]);
contentTabList.value = ((await store.getContentTabList()) || []).filter((item) => item.isShow);
// 插件状态存储
@@ -274,10 +282,20 @@
};
const handleTabChange = (key: string | number) => {
- if (key === 'displaySetting') {
+ if (key === 'SETTING') {
tabSettingVisible.value = true;
}
};
+
+ function getTabBadge(tabKey: string) {
+ switch (tabKey) {
+ case EnvTabTypeEnum.ENVIRONMENT_ASSERT:
+ const assertLength = store.currentEnvDetailInfo.config.assertionConfig.assertions.length;
+ return `${assertLength > 99 ? '99+' : assertLength || ''}`;
+ default:
+ return '';
+ }
+ }