Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/persistent-identifiers.spec.js
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | for (let td of testsData) { | ||||
cy.get('.modal.show .close') | cy.get('.modal.show .close') | ||||
.click() | .click() | ||||
.wait(500); | .wait(500); | ||||
} | } | ||||
}); | }); | ||||
it('should be possible to retrieve SWHIDs context from JavaScript', function() { | |||||
cy.window().then(win => { | |||||
const swhIdsContext = win.swh.webapp.getSwhIdsContext(); | |||||
for (let testData of testsData) { | |||||
assert.isTrue(swhIdsContext.hasOwnProperty(testData.objectType)); | |||||
assert.equal(swhIdsContext[testData.objectType].swh_id, | |||||
testData.objectPids.slice(-1)[0]); | |||||
} | |||||
}); | |||||
}); | |||||
}); | }); |