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

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

View File

@ -872,9 +872,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

@ -743,9 +743,12 @@ public class ApiTestEnvironmentService {
}
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());