From 0be3be4a28722f93b2e80c3217b4ed492724e3b7 Mon Sep 17 00:00:00 2001 From: baiqi Date: Wed, 27 Mar 2024 14:52:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E5=9C=BA=E6=99=AF):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=89=A7=E8=A1=8C=E4=BC=98=E5=8C=96&?= =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ms-assertion/index.vue | 2 +- frontend/src/enums/apiEnum.ts | 1 + frontend/src/models/apiTest/scenario.ts | 33 +++++++++---------- .../components/common/customApiDrawer.vue | 3 +- .../components/common/customCaseDrawer.vue | 2 +- .../components/common/executeStatus.vue | 27 +++++++++------ .../api-test/scenario/components/config.ts | 2 +- .../step/stepNodeComposition/loopContent.vue | 11 ++++--- .../stepNodeComposition/waitTimeContent.vue | 2 +- .../scenario/components/step/stepTree.vue | 20 ++++++----- .../src/views/api-test/scenario/index.vue | 13 ++++++++ .../views/api-test/scenario/locale/zh-CN.ts | 1 + 12 files changed, 73 insertions(+), 44 deletions(-) diff --git a/frontend/src/components/business/ms-assertion/index.vue b/frontend/src/components/business/ms-assertion/index.vue index 5dccadff68..12253dba58 100644 --- a/frontend/src/components/business/ms-assertion/index.vue +++ b/frontend/src/components/business/ms-assertion/index.vue @@ -149,7 +149,7 @@ import { ExecuteAssertionConfig } from '@/models/apiTest/common'; import { ResponseAssertionType, ResponseBodyAssertionType } from '@/enums/apiEnum'; - import { ExecuteAssertion, MsAssertionItem } from './type'; + import { MsAssertionItem } from './type'; defineOptions({ name: 'MsAssertion', diff --git a/frontend/src/enums/apiEnum.ts b/frontend/src/enums/apiEnum.ts index 2e186216c8..43f640bf15 100644 --- a/frontend/src/enums/apiEnum.ts +++ b/frontend/src/enums/apiEnum.ts @@ -247,6 +247,7 @@ export enum ScenarioExecuteStatus { EXECUTING = 'EXECUTING', FAILED = 'FAILED', STOP = 'STOP', + UN_EXECUTE = 'UN_EXECUTE', } // 场景步骤类型 export enum ScenarioStepType { diff --git a/frontend/src/models/apiTest/scenario.ts b/frontend/src/models/apiTest/scenario.ts index 263c091203..f863016ea7 100644 --- a/frontend/src/models/apiTest/scenario.ts +++ b/frontend/src/models/apiTest/scenario.ts @@ -43,23 +43,6 @@ export interface ApiScenarioGetModuleParams { refId?: string; } -// 场景修改参数 -export interface ApiScenarioUpdateDTO { - id: string | number; - name?: string; - priority?: string; - status?: ApiScenarioStatus; - moduleId?: string | number; - description?: string; - tags?: string[]; - grouped?: boolean; - environmentId?: string; - uploadFileIds?: string[]; - linkFileIds?: string[]; - deleteFileIds?: string[]; - unLinkFileIds?: string[]; -} - // 场景详情 export interface ApiScenarioTableItem { id: string; @@ -408,3 +391,19 @@ export interface ApiScenarioDebugRequest { linkFileIds: string[]; frontendDebug?: boolean; } + +// 场景修改参数 +export interface ApiScenarioUpdateDTO extends Partial { + id: string | number; + name?: string; + status?: ApiScenarioStatus; + moduleId?: string | number; + description?: string; + tags?: string[]; + grouped?: boolean; + environmentId?: string; + uploadFileIds?: string[]; + linkFileIds?: string[]; + deleteFileIds?: string[]; + unLinkFileIds?: string[]; +} diff --git a/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue b/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue index b1b0705f95..ffcea20792 100644 --- a/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue +++ b/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue @@ -217,7 +217,7 @@ - {{ status.text }} + {{ status.text }} diff --git a/frontend/src/views/api-test/scenario/components/config.ts b/frontend/src/views/api-test/scenario/components/config.ts index 7511586980..15e7d9234b 100644 --- a/frontend/src/views/api-test/scenario/components/config.ts +++ b/frontend/src/views/api-test/scenario/components/config.ts @@ -16,7 +16,7 @@ export const defaultLoopController = { variable: '', // 变量名 }, msCountController: { - loops: 0, // 循环次数 + loops: 1, // 循环次数 loopTime: 0, // 循环间隔时间 }, whileController: { diff --git a/frontend/src/views/api-test/scenario/components/step/stepNodeComposition/loopContent.vue b/frontend/src/views/api-test/scenario/components/step/stepNodeComposition/loopContent.vue index 183642f5bc..e23a7b5a12 100644 --- a/frontend/src/views/api-test/scenario/components/step/stepNodeComposition/loopContent.vue +++ b/frontend/src/views/api-test/scenario/components/step/stepNodeComposition/loopContent.vue @@ -10,7 +10,7 @@ /> - +
- +