Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/persistent-identifiers.spec.js
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | for (const td of testsData) { | ||||
.click(); | .click(); | ||||
cy.get(`#swhid-tab-${td.objectType} .swh-badge-origin`) | cy.get(`#swhid-tab-${td.objectType} .swh-badge-origin`) | ||||
.click() | .click() | ||||
.wait(500); | .wait(500); | ||||
for (const badgeType of ['html', 'md', 'rst']) { | for (const badgeType of ['html', 'md', 'rst']) { | ||||
cy.get(`.modal .swh-badge-${badgeType}`) | cy.get(`.modal .swh-badge-${badgeType}`) | ||||
.contains(`${urlPrefix}${originBrowseUrl}`) | .should('contain.text', `${urlPrefix}${originBrowseUrl}`) | ||||
.contains(`${urlPrefix}${originBadgeUrl}`); | .should('contain.text', `${urlPrefix}${originBadgeUrl}`); | ||||
} | } | ||||
cy.get('.modal.show .close') | cy.get('.modal.show .close') | ||||
.click() | .click() | ||||
.wait(500); | .wait(500); | ||||
cy.get(`#swhid-tab-${td.objectType} .swh-badge-${td.objectType}`) | cy.get(`#swhid-tab-${td.objectType} .swh-badge-${td.objectType}`) | ||||
.click() | .click() | ||||
.wait(500); | .wait(500); | ||||
for (const badgeType of ['html', 'md', 'rst']) { | for (const badgeType of ['html', 'md', 'rst']) { | ||||
cy.get(`.modal .swh-badge-${badgeType}`) | cy.get(`.modal .swh-badge-${badgeType}`) | ||||
.contains(`${urlPrefix}${td.browseUrl}`) | .should('contain.text', `${urlPrefix}${td.browseUrl}`) | ||||
.contains(`${urlPrefix}${td.badgeSWHIDUrl}`); | .should('contain.text', `${urlPrefix}${td.badgeSWHIDUrl}`); | ||||
} | } | ||||
cy.get('.modal.show .close') | cy.get('.modal.show .close') | ||||
.click() | .click() | ||||
.wait(500); | .wait(500); | ||||
} | } | ||||
}); | }); | ||||
Show All 13 Lines |