View | Details | Raw Unified | Return to bug 40169
Collapse All | Expand All

(-)a/t/cypress/integration/t/mockData.ts (+8 lines)
Lines 20-25 describe("Generate Random Patron", () => { Link Here
20
            );
20
            );
21
        });
21
        });
22
    });
22
    });
23
24
    it.only("should not overwrite _id if passed", () => {
25
        const home_library_id = "LIB4TEST";
26
        cy.task("buildSampleObject", {object: "item", values: {home_library_id}}).then(mockItem => {
27
            expect(mockItem.home_library_id).to.equal(home_library_id);
28
        });
29
    });
30
23
});
31
});
24
32
25
describe("Generate Random Patrons", () => {
33
describe("Generate Random Patrons", () => {
(-)a/t/cypress/plugins/mockData.js (-2 / +4 lines)
Lines 74-80 const generateDataFromSchema = (properties, values = {}) => { Link Here
74
    });
74
    });
75
75
76
    Object.keys(ids).forEach(k => {
76
    Object.keys(ids).forEach(k => {
77
        if (mockData.hasOwnProperty(k + "_id")) {
77
        if (
78
            mockData.hasOwnProperty(k + "_id") &&
79
            !values.hasOwnProperty(k + "_id")
80
        ) {
78
            mockData[k + "_id"] = ids[k];
81
            mockData[k + "_id"] = ids[k];
79
        }
82
        }
80
    });
83
    });
81
- 

Return to bug 40169