fix(接口测试): 修复删除脚本还发通知的缺陷

--bug=1026391 --user=王孝刚 【接口测试】接口自动化-删除场景中的后置脚本系统通知给出提示
https://www.tapd.cn/55049933/s/1374903
--bug=1026464 --user=王孝刚
【项目设置】创建环境-无全局前后置脚本和全局脚本断言-保存-也会发通知
https://www.tapd.cn/55049933/s/1374897
This commit is contained in:
wxg0103 2023-05-24 10:29:44 +08:00 committed by fit2-zhao
parent 31e2d936c1
commit e560dc110e
2 changed files with 8 additions and 2 deletions

View File

@ -1151,9 +1151,12 @@ public class ElementUtil {
}
public static boolean isSend(List<String> org, List<String> target) {
if (org.size() != target.size() && target.size() > 0) {
if (org.size() != target.size() && CollectionUtils.isEmpty(org)) {
return true;
}
if (org.size() != target.size() && CollectionUtils.isEmpty(target)) {
return false;
}
List<String> diff = org.stream()
.filter(s -> !target.contains(s))
.collect(Collectors.toList());

View File

@ -1111,9 +1111,12 @@ public class BaseEnvironmentService extends NodeTreeService<ApiModuleDTO> {
}
public static boolean isSend(List<String> orgList, List<String> targetList) {
if (orgList.size() != targetList.size() && targetList.size() > 0) {
if (orgList.size() != targetList.size() && CollectionUtils.isEmpty(orgList)) {
return true;
}
if (orgList.size() != targetList.size() && CollectionUtils.isEmpty(targetList)) {
return false;
}
List<String> diff = orgList.stream()
.filter(s -> !targetList.contains(s))
.collect(Collectors.toList());