From 58fdac39800021f9437d8c1f334f5119bd54fb09 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Sat, 2 Apr 2022 11:07:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E8=87=AA=E5=8A=A8=E5=8C=96mqtt=E6=8E=A5?= =?UTF-8?q?=E6=94=B6=E6=96=B9=E5=BC=8F=E5=A2=9E=E5=8A=A0=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1006377 --user=王孝刚 【接口测试】MQTT sub支持按消息内容结束接收 https://www.tapd.cn/55049933/s/1129300 --- .../scenario/component/PluginComponent.vue | 15 +- .../component/PluginContentAssertions.vue | 325 ++++++++++++++++++ 2 files changed, 338 insertions(+), 2 deletions(-) create mode 100644 frontend/src/business/components/api/automation/scenario/component/PluginContentAssertions.vue diff --git a/frontend/src/business/components/api/automation/scenario/component/PluginComponent.vue b/frontend/src/business/components/api/automation/scenario/component/PluginComponent.vue index 0ee4e94df1..b2ad63b021 100644 --- a/frontend/src/business/components/api/automation/scenario/component/PluginComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/PluginComponent.vue @@ -137,10 +137,11 @@ import MsUpload from "../common/MsPluginUpload"; import {PLUGIN_ELEMENTS} from "@/business/components/api/automation/scenario/Setting"; import {getUUID} from "@/common/js/utils"; import MsJmxStep from "../../../definition/components/step/JmxStep"; -import {Assertions} from "@/business/components/api/definition/model/ApiTestModel"; import {stepCompute, hisDataProcessing} from "@/business/components/api/definition/api-definition"; +import MsPluginContentAssertions from "@/business/components/api/automation/scenario/component/PluginContentAssertions"; formCreate.component("msUpload", MsUpload); +formCreate.component("msPluginContentAssertions", MsPluginContentAssertions); export default { name: "PluginComponent", @@ -149,6 +150,7 @@ export default { ApiResponseComponent, MsJmxStep, MsRun: () => import("../../../definition/components/Run"), + MsPluginContentAssertions }, props: { draggable: { @@ -281,10 +283,19 @@ export default { }, changeDisplay(fileName) { if (fileName === 'number of received messages' && this.pluginForm && this.pluginForm.hidden instanceof Function) { - this.pluginForm.hidden(true, "conditionTime"); + this.pluginForm.hidden(false, "conditionTime"); + this.pluginForm.hidden(false, "conditionValue"); + this.pluginForm.hidden(true, "conditionContent"); } if (fileName === 'specified elapsed time (ms)' && this.pluginForm && this.pluginForm.hidden instanceof Function) { this.pluginForm.hidden(false, "conditionTime"); + this.pluginForm.hidden(true, "conditionValue") + this.pluginForm.hidden(true, "conditionContent"); + } + if (fileName === 'content of received messages' && this.pluginForm && this.pluginForm.hidden instanceof Function) { + this.pluginForm.hidden(false, "conditionContent"); + this.pluginForm.hidden(true, "conditionValue"); + this.pluginForm.hidden(true, "conditionTime"); } }, run() { diff --git a/frontend/src/business/components/api/automation/scenario/component/PluginContentAssertions.vue b/frontend/src/business/components/api/automation/scenario/component/PluginContentAssertions.vue new file mode 100644 index 0000000000..655e471443 --- /dev/null +++ b/frontend/src/business/components/api/automation/scenario/component/PluginContentAssertions.vue @@ -0,0 +1,325 @@ + + + +