diff --git a/frontend/src/components/business/ms-assertion/comp/ResponseHeaderTab.vue b/frontend/src/components/business/ms-assertion/comp/ResponseHeaderTab.vue index e8473a011d..ee59868bcf 100644 --- a/frontend/src/components/business/ms-assertion/comp/ResponseHeaderTab.vue +++ b/frontend/src/components/business/ms-assertion/comp/ResponseHeaderTab.vue @@ -18,11 +18,9 @@ import { EQUAL } from '@/components/pure/ms-advance-filter/index'; import paramsTable, { type ParamTableColumn } from '@/views/api-test/components/paramTable.vue'; - import { responseHeaderOption } from '@/config/apiTest'; - import type { ExecuteAssertionItem } from '@/models/apiTest/common'; - import { statusCodeOptions } from './utils'; + import { responseHeaderOption, statusCodeOptions } from './utils'; interface Param { [key: string]: any; diff --git a/frontend/src/components/business/ms-assertion/comp/utils.ts b/frontend/src/components/business/ms-assertion/comp/utils.ts index 12cb4d21e6..691743aab3 100644 --- a/frontend/src/components/business/ms-assertion/comp/utils.ts +++ b/frontend/src/components/business/ms-assertion/comp/utils.ts @@ -14,4 +14,18 @@ import { export const statusCodeOptions = [CONTAINS, NO_CONTAINS, EQUAL, NOT_EQUAL]; export const codeOptions = [CONTAINS, NO_CONTAINS, EQUAL, NOT_EQUAL, NO_CHECK]; +// 断言响应头 +export const responseHeaderOption = [ + { label: 'Content-Type', value: 'Content-Type' }, + { label: 'Content-Length', value: 'Content-Length' }, + { label: 'Content-Control', value: 'Content-Control' }, + { label: 'Content-Disposition', value: 'Content-Disposition' }, + { label: 'Content-Encoding', value: 'Content-Encoding' }, + { label: 'Location', value: 'Location' }, + { label: 'Set-Cookie', value: 'Set-Cookie' }, + { label: 'Access-Control-Allow-Origin', value: 'Access-Control-Allow-Origin' }, + { label: 'Expires', value: 'Expires' }, + { label: 'Last-Modified', value: 'Last-Modified' }, +]; + export default {}; diff --git a/frontend/src/components/business/ms-common-script/utils.ts b/frontend/src/components/business/ms-common-script/utils.ts index 5629ca6153..1129bcd73a 100644 --- a/frontend/src/components/business/ms-common-script/utils.ts +++ b/frontend/src/components/business/ms-common-script/utils.ts @@ -35,23 +35,23 @@ export const SCRIPT_MENU: CommonScriptMenu[] = [ }, { title: t('project.processor.codeTemplateGetVariable'), - value: 'vars.get("variable_name")', + value: 'vars.get("variable_name");', }, { title: t('project.processor.codeTemplateSetVariable'), - value: 'vars.put("variable_name", "variable_value")', + value: 'vars.put("variable_name", "variable_value");', }, { title: t('project.processor.codeTemplateGetResponseHeader'), - value: 'prev.getResponseHeaders()', + value: 'prev.getResponseHeaders();', }, { title: t('project.processor.codeTemplateGetResponseCode'), - value: 'prev.getResponseCode()', + value: 'prev.getResponseCode();', }, { title: t('project.processor.codeTemplateGetResponseResult'), - value: 'prev.getResponseDataAsString()', + value: 'prev.getResponseDataAsString();', }, { title: t('project.processor.paramEnvironmentSetGlobalVariable'), diff --git a/frontend/src/components/pure/navbar/taskCenterModal.vue b/frontend/src/components/pure/navbar/taskCenterModal.vue index 4e7d45b59f..b33ec46313 100644 --- a/frontend/src/components/pure/navbar/taskCenterModal.vue +++ b/frontend/src/components/pure/navbar/taskCenterModal.vue @@ -21,13 +21,15 @@ {{ t('settings.navbar.task') }}