Changeset View
Changeset View
Standalone View
Standalone View
cypress/e2e/persistent-identifiers.cy.js
Show All 23 Lines | before(function() { | ||||
url = `${url}&release=${origin.release.name}#L${firstSelLine}-L${lastSelLine}`; | url = `${url}&release=${origin.release.name}#L${firstSelLine}-L${lastSelLine}`; | ||||
originBadgeUrl = this.Urls.swh_badge('origin', origin.url); | originBadgeUrl = this.Urls.swh_badge('origin', origin.url); | ||||
originBrowseUrl = `${this.Urls.browse_origin()}?origin_url=${origin.url}`; | originBrowseUrl = `${this.Urls.browse_origin()}?origin_url=${origin.url}`; | ||||
cy.visit(url).window().then(win => { | cy.visit(url).window().then(win => { | ||||
urlPrefix = `${win.location.protocol}//${win.location.hostname}`; | urlPrefix = `${win.location.protocol}//${win.location.hostname}`; | ||||
if (win.location.port) { | if (win.location.port) { | ||||
urlPrefix += `:${win.location.port}`; | urlPrefix += `:${win.location.port}`; | ||||
} | } | ||||
// for some reasons, cypress hangs when visiting that URL in beforeEach callback | |||||
// due to HTTP redirection, so get the redirected URL here to workaround that issue. | |||||
anlambert: I do not know why those tests start hanging locally but this is not related to the type command… | |||||
url = win.location.href; | |||||
const swhids = win.swh.webapp.getSwhIdsContext(); | const swhids = win.swh.webapp.getSwhIdsContext(); | ||||
cntSWHID = swhids.content.swhid; | cntSWHID = swhids.content.swhid; | ||||
cntSWHIDWithContext = swhids.content.swhid_with_context; | cntSWHIDWithContext = swhids.content.swhid_with_context; | ||||
cntSWHIDWithContext += `;lines=${firstSelLine}-${lastSelLine}`; | cntSWHIDWithContext += `;lines=${firstSelLine}-${lastSelLine}`; | ||||
dirSWHID = swhids.directory.swhid; | dirSWHID = swhids.directory.swhid; | ||||
dirSWHIDWithContext = swhids.directory.swhid_with_context; | dirSWHIDWithContext = swhids.directory.swhid_with_context; | ||||
revSWHID = swhids.revision.swhid; | revSWHID = swhids.revision.swhid; | ||||
revSWHIDWithContext = swhids.revision.swhid_with_context; | revSWHIDWithContext = swhids.revision.swhid_with_context; | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |
I do not know why those tests start hanging locally but this is not related to the type command overriding.
I put that change in a separate commit.