Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/persistent-identifiers.spec.js
Show All 15 Lines | |||||
let testsData; | let testsData; | ||||
const firstSelLine = 6; | const firstSelLine = 6; | ||||
const lastSelLine = 12; | const lastSelLine = 12; | ||||
describe('Persistent Identifiers Tests', function() { | describe('Persistent Identifiers Tests', function() { | ||||
before(function() { | before(function() { | ||||
origin = this.origin[1]; | origin = this.origin[1]; | ||||
url = this.Urls.browse_origin_content(origin.url, origin.content[0].path); | url = `${this.Urls.browse_origin_content(origin.url)}?path=${origin.content[0].path}`; | ||||
url = `${url}?release=${origin.release}#L${firstSelLine}-L${lastSelLine}`; | url = `${url}&release=${origin.release}#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); | originBrowseUrl = this.Urls.browse_origin(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}`; | ||||
} | } | ||||
browsedObjectMetadata = win.swh.webapp.getBrowsedSwhObjectMetadata(); | browsedObjectMetadata = win.swh.webapp.getBrowsedSwhObjectMetadata(); | ||||
▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines |