Issue-ID: VID-740
Change-Id: I75d69d1b70e9c6a82984a1d6f61a972827c19e03
Signed-off-by: Ittay Stern <ittay.stern@att.com>
function deepCompare(actual : any, expected : any) {
if(actual !== null && expected !== null){
function deepCompare(actual : any, expected : any) {
if(actual !== null && expected !== null){
+ const actualOriginal = JSON.stringify(actual);
+ const expectedOriginal = JSON.stringify(expected);
+
let diff : any[] = [];
Cypress._.mergeWith(actual, expected, function (objectValue, sourceValue, key, object, source) {
if ( !(_.isEqual(objectValue, sourceValue)) && (Object(objectValue) !== objectValue)) {
let diff : any[] = [];
Cypress._.mergeWith(actual, expected, function (objectValue, sourceValue, key, object, source) {
if ( !(_.isEqual(objectValue, sourceValue)) && (Object(objectValue) !== objectValue)) {
if(diff.length > 0){
console.error("diff", diff);
cy.log("The object are not equals", diff);
if(diff.length > 0){
console.error("diff", diff);
cy.log("The object are not equals", diff);
- expect(actual).equals(expected, `diff: ${diff}, actual:${JSON.stringify(actual)}, expected:${JSON.stringify(expected)}`);
+ expect(actual).equals(expected, `diff: ${diff}, actual:${actualOriginal}, expected:${expectedOriginal}`);