fix(接口测试): 插件响应展示

This commit is contained in:
baiqi 2024-10-25 16:23:26 +08:00 committed by 刘瑞斌
parent ad200bdac3
commit ba9c4afc76
3 changed files with 6 additions and 2 deletions

View File

@ -949,7 +949,7 @@
() => () =>
isHttpProtocol.value || isHttpProtocol.value ||
!props.isDefinition || !props.isDefinition ||
requestVModel.value.response?.requestResults[0]?.responseResult.responseCode || requestVModel.value.response?.requestResults[0]?.responseResult ||
props.isCase props.isCase
); );
const activeLayout = ref<'horizontal' | 'vertical'>('vertical'); const activeLayout = ref<'horizontal' | 'vertical'>('vertical');

View File

@ -944,7 +944,7 @@
} }
const showResponse = computed( const showResponse = computed(
() => isHttpProtocol.value || requestVModel.value.response?.requestResults[0]?.responseResult.responseCode () => isHttpProtocol.value || requestVModel.value.response?.requestResults[0]?.responseResult
); );
const activeLayout = ref<'horizontal' | 'vertical'>('vertical'); const activeLayout = ref<'horizontal' | 'vertical'>('vertical');
const isVerticalExpanded = computed(() => activeLayout.value === 'vertical'); const isVerticalExpanded = computed(() => activeLayout.value === 'vertical');
@ -1064,6 +1064,7 @@
if (valid === true) { if (valid === true) {
emit('execute', makeRequestParams(executeType) as RequestParam, executeType); emit('execute', makeRequestParams(executeType) as RequestParam, executeType);
} else { } else {
requestVModel.value.executeLoading = false;
requestVModel.value.activeTab = RequestComposition.PLUGIN; requestVModel.value.activeTab = RequestComposition.PLUGIN;
nextTick(() => { nextTick(() => {
scrollIntoView(document.querySelector('.arco-form-item-message'), { block: 'center' }); scrollIntoView(document.querySelector('.arco-form-item-message'), { block: 'center' });

View File

@ -70,6 +70,9 @@ export default function useStepExecute({
websocketMap[reportId]?.close(); websocketMap[reportId]?.close();
if (step.reportId === data.reportId) { if (step.reportId === data.reportId) {
step.isExecuting = false; step.isExecuting = false;
if (_scenario.stepResponses[step.uniqueId] === undefined) {
_scenario.stepResponses[step.uniqueId] = [];
}
updateStepStatus([step], _scenario.stepResponses, step.uniqueId); updateStepStatus([step], _scenario.stepResponses, step.uniqueId);
} }
} }