feat(接口测试): 场景前后置&断言&设置

This commit is contained in:
WangXu10 2024-03-16 19:22:51 +08:00 committed by Craftsman
parent 8c3342519e
commit 056a972a71
4 changed files with 51 additions and 9 deletions

View File

@ -1,7 +1,15 @@
<template>
<div> assertion </div>
<assertion v-model:params="assertions" :is-definition="false" :assertion-config="assertionConfig" />
</template>
<script setup lang="ts"></script>
<script setup lang="ts">
import assertion from '@/components/business/ms-assertion/index.vue';
const assertions = ref([]);
const assertionConfig = ref({
enableGlobal: false,
assertions: [],
});
</script>
<style lang="less" scoped></style>

View File

@ -4,11 +4,11 @@
{{ t('apiScenario.params.priority') }}
</a-alert>
</div>
<div class="mb-[16px]">
<!-- <div class="mb-[16px]">
<a-radio-group v-model="activeRadio" type="button" size="medium">
<a-radio value="convention">{{ t('apiScenario.params.convention') }}</a-radio>
</a-radio-group>
</div>
</div>-->
<div class="mb-[16px] flex items-center justify-between">
<a-input-search
v-model="searchValue"

View File

@ -1,7 +1,35 @@
<template>
<div> prePost </div>
<div class="condition">
<div>
<precondition v-model:config="preProcessorConfig" :is-definition="false" />
</div>
<a-divider class="my-[8px]" type="dashed" />
<div>
<postcondition v-model:config="postProcessorConfig" :is-definition="false" :layout="activeLayout" />
</div>
</div>
</template>
<script setup lang="ts"></script>
<script setup lang="ts">
import postcondition from '@/views/api-test/components/requestComposition/postcondition.vue';
import precondition from '@/views/api-test/components/requestComposition/precondition.vue';
<style lang="less" scoped></style>
const activeLayout = ref<'horizontal' | 'vertical'>('vertical');
const preProcessorConfig = ref({
enableGlobal: false,
processors: [],
});
const postProcessorConfig = ref({
enableGlobal: false,
processors: [],
});
</script>
<style lang="less" scoped>
.condition {
flex-shrink: 0;
width: 100%;
height: 700px;
overflow: overlay;
}
</style>

View File

@ -1,7 +1,13 @@
<template>
<div> setting </div>
<setting v-model:params="otherConfig" />
</template>
<script setup lang="ts"></script>
<script setup lang="ts">
import setting from '@/views/api-test/components/requestComposition/setting.vue';
import { ExecuteOtherConfig } from '@/models/apiTest/common';
const otherConfig = ref({} as ExecuteOtherConfig);
</script>
<style lang="less" scoped></style>