fix(接口测试): 报告筛选步骤问题
--bug=1039085 --user=宋昌昌 【接口测试】报告筛选步骤为通过显示内容不正确 https://www.tapd.cn/55049933/s/1495619
This commit is contained in:
parent
7861bca060
commit
a42b9d9cbb
|
@ -100,16 +100,13 @@
|
||||||
function searchStep() {
|
function searchStep() {
|
||||||
const splitLevel = props.keyWords.split('-');
|
const splitLevel = props.keyWords.split('-');
|
||||||
const stepTypeStatus = splitLevel[1];
|
const stepTypeStatus = splitLevel[1];
|
||||||
const requestType = ['API', 'API_CASE', 'CUSTOM_REQUEST'];
|
|
||||||
const stepType = splitLevel[0] === 'CUSTOM_REQUEST' ? ['API', 'API_CASE', 'CUSTOM_REQUEST'] : splitLevel[0];
|
|
||||||
const search = (_data: ScenarioItemType[]) => {
|
const search = (_data: ScenarioItemType[]) => {
|
||||||
const result: ScenarioItemType[] = [];
|
const result: ScenarioItemType[] = [];
|
||||||
_data.forEach((item) => {
|
_data.forEach((item) => {
|
||||||
const isStepChildren = item.children && item?.children.length && showApiType.value.includes(item.stepType);
|
const isStepChildren = item.children && item?.children.length && showApiType.value.includes(item.stepType);
|
||||||
if (
|
if (
|
||||||
stepType.includes(item.stepType) &&
|
(item.status && item.status === stepTypeStatus && stepTypeStatus !== 'scriptIdentifier') ||
|
||||||
((item.status && item.status === stepTypeStatus && stepTypeStatus !== 'scriptIdentifier') ||
|
(stepTypeStatus.includes('scriptIdentifier') && item.scriptIdentifier)
|
||||||
(stepTypeStatus.includes('scriptIdentifier') && item.scriptIdentifier))
|
|
||||||
) {
|
) {
|
||||||
const resItem = {
|
const resItem = {
|
||||||
...item,
|
...item,
|
||||||
|
@ -118,7 +115,7 @@
|
||||||
children: isStepChildren ? [] : item.children,
|
children: isStepChildren ? [] : item.children,
|
||||||
};
|
};
|
||||||
result.push(resItem);
|
result.push(resItem);
|
||||||
} else if (item.children) {
|
} else if (item.children && splitLevel[0] === ScenarioStepType.CUSTOM_REQUEST) {
|
||||||
const filterData = search(item.children);
|
const filterData = search(item.children);
|
||||||
if (filterData.length) {
|
if (filterData.length) {
|
||||||
const filterItem = {
|
const filterItem = {
|
||||||
|
|
|
@ -242,7 +242,7 @@
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
try {
|
try {
|
||||||
// 保存Host-Tab的数据(目前只加了Host)
|
// 保存Host-Tab的数据(目前只加了Host)
|
||||||
if (activeKey.value === 'host') {
|
if (activeKey.value === EnvTabTypeEnum.ENVIRONMENT_HOST) {
|
||||||
hostTabRef.value?.validateForm(saveCallBack);
|
hostTabRef.value?.validateForm(saveCallBack);
|
||||||
} else {
|
} else {
|
||||||
await saveCallBack();
|
await saveCallBack();
|
||||||
|
|
|
@ -272,9 +272,6 @@
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: white;
|
background: white;
|
||||||
@apply flex flex-col justify-between;
|
@apply flex flex-col justify-between;
|
||||||
.icon {
|
|
||||||
border: 1px solid var(--color-text-n9);
|
|
||||||
}
|
|
||||||
.ms-enable {
|
.ms-enable {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
border-radius: var(--border-radius-small);
|
border-radius: var(--border-radius-small);
|
||||||
|
|
Loading…
Reference in New Issue