Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/persistent-identifiers.spec.js
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | it('should display badge integration info when clicking on it', function() { | ||||
} | } | ||||
}); | }); | ||||
it('should be possible to retrieve SWHIDs context from JavaScript', function() { | it('should be possible to retrieve SWHIDs context from JavaScript', function() { | ||||
cy.window().then(win => { | cy.window().then(win => { | ||||
const swhIdsContext = win.swh.webapp.getSwhIdsContext(); | const swhIdsContext = win.swh.webapp.getSwhIdsContext(); | ||||
for (let testData of testsData) { | for (let testData of testsData) { | ||||
assert.isTrue(swhIdsContext.hasOwnProperty(testData.objectType)); | assert.isTrue(swhIdsContext.hasOwnProperty(testData.objectType)); | ||||
assert.equal(swhIdsContext[testData.objectType].swh_id, | assert.equal(swhIdsContext[testData.objectType].swhid, | ||||
testData.objectPids.slice(-1)[0]); | testData.objectPids.slice(-1)[0]); | ||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
}); | }); |