cypress test - provide more details upon deepCompare failure 09/100009/1
authorEylon Malin <eylon.malin@intl.att.com>
Mon, 6 Jan 2020 06:55:12 +0000 (08:55 +0200)
committerEylon Malin <eylon.malin@intl.att.com>
Mon, 6 Jan 2020 06:55:12 +0000 (08:55 +0200)
Issue-ID: VID-740
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Change-Id: I8c2a23fe9b69bd6f2395083d07d0a3ec7ed60b8f

vid-webpack-master/cypress/support/steps/general/compareDeepObjects.step.ts

index ee5e95a..901a9b1 100644 (file)
@@ -24,7 +24,7 @@ function deepCompare(actual : any, expected : any) {
     if(diff.length > 0){
       console.error("diff", diff);
       cy.log("The object are not equals", diff);
-      expect(actual).equals(expected);
+      expect(actual).equals(expected, `diff: ${diff}, actual:${JSON.stringify(actual)}, expected:${JSON.stringify(expected)}`);
     }
   }
 }