fix(接口测试): 断言后调整断言又执行更新断言结果

This commit is contained in:
baiqi 2024-11-21 14:01:30 +08:00 committed by Craftsman
parent a5a64ba5a4
commit 706dfadca6
3 changed files with 10 additions and 1 deletions

View File

@ -71,6 +71,7 @@
<result <result
v-else-if="!props.isEdit || (props.isEdit && activeResponseType === 'result')" v-else-if="!props.isEdit || (props.isEdit && activeResponseType === 'result')"
v-model:active-tab="activeTab" v-model:active-tab="activeTab"
:loading="props.loading"
:request-result="props.requestResult" :request-result="props.requestResult"
:console="props.console" :console="props.console"
:is-http-protocol="props.isHttpProtocol" :is-http-protocol="props.isHttpProtocol"

View File

@ -6,7 +6,7 @@
</a-tabs> </a-tabs>
<slot name="tabRight"></slot> <slot name="tabRight"></slot>
</div> </div>
<div class="response-container"> <div v-if="!props.loading" class="response-container">
<ResBody <ResBody
v-if="activeTab === ResponseComposition.BODY" v-if="activeTab === ResponseComposition.BODY"
ref="resBodyRef" ref="resBodyRef"
@ -79,6 +79,7 @@
isHttpProtocol?: boolean; isHttpProtocol?: boolean;
isDefinition?: boolean; isDefinition?: boolean;
showEmpty?: boolean; showEmpty?: boolean;
loading?: boolean;
}>(), }>(),
{ {
showEmpty: true, showEmpty: true,

View File

@ -163,6 +163,13 @@
: props.requestResult?.responseResult.assertions || []; : props.requestResult?.responseResult.assertions || [];
} }
} }
watch(
() => props.requestResult?.responseResult.assertions,
() => {
tableData.value = props.requestResult?.responseResult.assertions || [];
}
);
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>