Browse Source

test: 校验后清空内容

xyh 2 years ago
parent
commit
9e32deacd7
1 changed files with 5 additions and 4 deletions
  1. 5 4
      cypress/e2e/utils/utils.ts

+ 5 - 4
cypress/e2e/utils/utils.ts

@@ -192,9 +192,6 @@ export function validateTableSearch(
 
   function eachAllField(skipValidate = false) {
     keys.forEach(function (key, idx) {
-      if (idx > 0 && !skipValidate) {
-        clear(keys[idx - 1]);
-      }
       let validateText: string;
 
       if (typeof key === 'string') {
@@ -213,7 +210,11 @@ export function validateTableSearch(
             break;
         }
       }
-      !skipValidate && validate(validateText);
+
+      if (!skipValidate) {
+        validate(validateText);
+        clear(keys[idx]);
+      }
     });
   }