From aa704da18cdc01cdb550c316993605281e82e4dd Mon Sep 17 00:00:00 2001 From: zhangdahai112 Date: Sun, 25 Dec 2022 17:07:03 +0800 Subject: [PATCH] =?UTF-8?q?revert(UI=E8=87=AA=E5=8A=A8=E5=8C=96):=20?= =?UTF-8?q?=E6=94=BE=E5=BC=80UI=E7=8E=AF=E5=A2=83=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../environment/EnvironmentHttpConfig.vue | 78 +++++++-- .../commons/ApiScenarioVariables.vue | 151 ++++++++++++++---- .../menu/environment/EnvironmentList.vue | 8 +- .../components/EnvironmentEdit.vue | 2 +- .../plan/service/TestPlanService.java | 32 +++- .../comonents/ui/RelevanceUiScenarioList.vue | 35 +++- .../ui/TestCaseUiScenarioRelevance.vue | 6 +- .../comonents/ui/TestPlanUiScenarioList.vue | 32 ++-- .../plan/view/comonents/ui/UiRunMode.vue | 47 +++++- .../src/business/utils/track-table-header.js | 1 + 10 files changed, 328 insertions(+), 64 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue index a1596704c6..d1b6f0918d 100644 --- a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue @@ -45,11 +45,57 @@ -

{{ $t('api_test.request.headers') }}

- - {{ $t("commons.batch_add") }} - - + + +

{{ $t('api_test.request.headers') }}

+ + {{ + $t("commons.batch_add") + }} + + + +
+ + + + + + + {{ $t("ui.browser") }} + + + + + + + + + {{ $t("ui.performance_mode") }} + + + + + + + + + + + + +
{{ $t('commons.add') }} @@ -121,10 +167,12 @@ import {getUUID} from "../../utils"; import {KeyValue} from "../../model/EnvTestModel"; import Vue from "vue"; import BatchAddParameter from "./commons/BatchAddParameter"; +import FormSection from "metersphere-frontend/src/components/form/FormSection"; +import MsInstructionsIcon from 'metersphere-frontend/src/components/MsInstructionsIcon'; export default { name: "MsEnvironmentHttpConfig", - components: {MsApiKeyValue, MsSelectTree, MsTableOperatorButton, BatchAddParameter}, + components: {MsApiKeyValue, MsSelectTree, MsTableOperatorButton, BatchAddParameter, FormSection, MsInstructionsIcon}, props: { httpConfig: new HttpConfig(), projectId: String, @@ -165,9 +213,21 @@ export default { socket: "", domain: "", port: 0, - headers: [new KeyValue()] + headers: [new KeyValue()], + headlessEnabled: true, + browser: 'CHROME' }, - beforeCondition: {} + beforeCondition: {}, + browsers: [ + { + label: this.$t("chrome"), + value: "CHROME", + }, + { + label: this.$t("firefox"), + value: "FIREFOX", + }, + ], }; }, watch: { @@ -289,7 +349,7 @@ export default { list() { if (this.projectId) { this.result = getApiModuleByProjectIdAndProtocol(this.projectId, "HTTP").then((response) => { - if (response.data && response.data !== null) { + if (response.data && response.data !== null) { this.moduleOptions = response.data; } }); diff --git a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue index 91a9ded583..9c1799bbb6 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue @@ -18,12 +18,18 @@ :content="$t('commons.import')" @click="importJSON" /> - + + + + {{ $t('envrionment.export_variable_tip') }} + + + + + + + + + + + + @@ -128,14 +173,14 @@ sortable >