fix(UI 自动化): 测试计划ui关联用例模块数量统计错误

--bug=1015020 --user=张大海 【测试跟踪】测试计划中关联UI测试用例后左侧模块数量统计错误 https://www.tapd.cn/55049933/s/1213090

--bug=1015042 --user=张大海 【测试跟踪】测试计划详情-UI测试用例列表,左侧的模块树统计不对 https://www.tapd.cn/55049933/s/1213091
This commit is contained in:
zhangdahai112 2022-07-27 10:40:52 +08:00 committed by f2c-ci-robot[bot]
parent ac2644876d
commit c737018d20
2 changed files with 113 additions and 108 deletions

View File

@ -13,6 +13,7 @@
@setModuleOptions="setModuleOptions" @setModuleOptions="setModuleOptions"
:relevance-project-id="projectId" :relevance-project-id="projectId"
:is-read-only="true" :is-read-only="true"
:show-case-num="false"
ref="nodeTree"/> ref="nodeTree"/>
</template> </template>
@ -35,9 +36,10 @@ import TestCaseRelevanceBase from "../base/TestCaseRelevanceBase";
import {strMapToObj} from "../../../../../../../common/js/utils"; import {strMapToObj} from "../../../../../../../common/js/utils";
import ApiCaseSimpleList from "../../../../../api/definition/components/list/ApiCaseSimpleList"; import ApiCaseSimpleList from "../../../../../api/definition/components/list/ApiCaseSimpleList";
import MsApiScenarioList from "../../../../../api/automation/scenario/ApiScenarioList"; import MsApiScenarioList from "../../../../../api/automation/scenario/ApiScenarioList";
import UiScenarioModule from "@/business/components/xpack/ui/automation/scenario/UiScenarioModule";
import RelevanceUiScenarioList from "@/business/components/track/plan/view/comonents/api/RelevanceUiScenarioList"; import RelevanceUiScenarioList from "@/business/components/track/plan/view/comonents/api/RelevanceUiScenarioList";
import {ENV_TYPE} from "@/common/js/constants"; import {ENV_TYPE} from "@/common/js/constants";
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const UiScenarioModule = requireComponent.keys().length > 0 ? requireComponent("./ui/automation/scenario/UiScenarioModule.vue") : {};
export default { export default {
name: "TestCaseUiScenarioRelevance", name: "TestCaseUiScenarioRelevance",
@ -45,7 +47,7 @@ export default {
RelevanceUiScenarioList, RelevanceUiScenarioList,
MsApiScenarioList, MsApiScenarioList,
ApiCaseSimpleList, ApiCaseSimpleList,
UiScenarioModule, "UiScenarioModule" : UiScenarioModule.default,
TestCaseRelevanceBase, TestCaseRelevanceBase,
}, },
data() { data() {

View File

@ -10,6 +10,7 @@
:is-read-only="true" :is-read-only="true"
:plan-id="planId" :plan-id="planId"
:plan-status="planStatus" :plan-status="planStatus"
:show-case-num="false"
ref="scenarioNodeTree"> ref="scenarioNodeTree">
</ui-scenario-module> </ui-scenario-module>
</template> </template>
@ -48,16 +49,18 @@
import ApiCaseSimpleList from "../../../../../api/definition/components/list/ApiCaseSimpleList"; import ApiCaseSimpleList from "../../../../../api/definition/components/list/ApiCaseSimpleList";
import MsApiModule from "../../../../../api/definition/components/module/ApiModule"; import MsApiModule from "../../../../../api/definition/components/module/ApiModule";
import MsTestPlanUiScenarioList from "./TestPlanUiScenarioList"; import MsTestPlanUiScenarioList from "./TestPlanUiScenarioList";
import UiScenarioModule from "@/business/components/xpack/ui/automation/scenario/UiScenarioModule";
import TestCaseUiScenarioRelevance import TestCaseUiScenarioRelevance
from "@/business/components/track/plan/view/comonents/api/TestCaseUiScenarioRelevance"; from "@/business/components/track/plan/view/comonents/api/TestCaseUiScenarioRelevance";
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const UiScenarioModule = requireComponent.keys().length > 0 ? requireComponent("./ui/automation/scenario/UiScenarioModule.vue") : {};
export default { export default {
name: "TestPlanUi", name: "TestPlanUi",
components: { components: {
TestCaseUiScenarioRelevance, TestCaseUiScenarioRelevance,
MsTestPlanUiScenarioList, MsTestPlanUiScenarioList,
UiScenarioModule, "UiScenarioModule": UiScenarioModule.default,
MsApiModule, MsApiModule,
ApiCaseSimpleList, ApiCaseSimpleList,
TestCaseApiRelevance, TestCaseApiRelevance,