fix(接口测试): 场景自定义请求标题问题修复

This commit is contained in:
baiqi 2024-08-19 18:33:24 +08:00 committed by Craftsman
parent 6ffc936be2
commit 38f11e7686
2 changed files with 5 additions and 1 deletions

View File

@ -557,6 +557,9 @@
border: 0.5px solid var(--color-text-n8); border: 0.5px solid var(--color-text-n8);
border-radius: var(--border-radius-medium); border-radius: var(--border-radius-medium);
box-shadow: 0 6px 30px 5px rgb(0 0 0 / 5%), 0 16px 24px 2px rgb(0 0 0 / 4%), 0 8px 10px -5px rgb(0 0 0 / 8%); box-shadow: 0 6px 30px 5px rgb(0 0 0 / 5%), 0 16px 24px 2px rgb(0 0 0 / 4%), 0 8px 10px -5px rgb(0 0 0 / 8%);
.arco-message-content {
@apply break-all;
}
} }
/** 图标 **/ /** 图标 **/

View File

@ -3,7 +3,7 @@ import type { MsTreeNodeData } from '@/components/business/ms-tree/types';
import { localExecuteApiDebug } from '@/api/modules/api-test/common'; import { localExecuteApiDebug } from '@/api/modules/api-test/common';
import { debugScenario } from '@/api/modules/api-test/scenario'; import { debugScenario } from '@/api/modules/api-test/scenario';
import { getSocket } from '@/api/modules/project-management/commonScript'; import { getSocket } from '@/api/modules/project-management/commonScript';
import { t } from '@/hooks/useI18n'; import { useI18n } from '@/hooks/useI18n';
import useAppStore from '@/store/modules/app'; import useAppStore from '@/store/modules/app';
import { findNodeByKey, getGenerateId, mapTree, traverseTree } from '@/utils'; import { findNodeByKey, getGenerateId, mapTree, traverseTree } from '@/utils';
@ -162,6 +162,7 @@ export default function useStepExecute({
* @param executeType * @param executeType
*/ */
function handleApiExecute(request: RequestParam, executeType?: 'localExec' | 'serverExec') { function handleApiExecute(request: RequestParam, executeType?: 'localExec' | 'serverExec') {
const { t } = useI18n();
const realStep = findNodeByKey<ScenarioStepItem>(steps.value, request.uniqueId || request.stepId, 'uniqueId'); const realStep = findNodeByKey<ScenarioStepItem>(steps.value, request.uniqueId || request.stepId, 'uniqueId');
if (realStep) { if (realStep) {
delete scenario.value.stepResponses[realStep.uniqueId]; // 先移除上一次的执行结果 delete scenario.value.stepResponses[realStep.uniqueId]; // 先移除上一次的执行结果