Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/deposit-admin.spec.js
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | cy.wait('@listDeposits').then((xhr) => { | ||||
if (deposit.status_detail !== null) { | if (deposit.status_detail !== null) { | ||||
cy.contains(deposit.status_detail).should('be.visible'); | cy.contains(deposit.status_detail).should('be.visible'); | ||||
} | } | ||||
// those are hidden by default, so now they should be visible | // those are hidden by default, so now they should be visible | ||||
if (deposit.swhid !== null) { | if (deposit.swhid !== null) { | ||||
cy.contains(deposit.swhid).should('be.visible'); | cy.contains(deposit.swhid).should('be.visible'); | ||||
cy.contains(deposit.swhid_context).should('be.visible'); | cy.contains(deposit.swhid_context).should('be.visible'); | ||||
// check SWHID link text formatting | |||||
cy.contains(deposit.swhid_context).then(elt => { | |||||
expect(elt[0].innerHTML).to.equal(deposit.swhid_context.replace(/;/g, ';<br>')); | |||||
}); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
cy.get('#swh-admin-deposit-list-error') | cy.get('#swh-admin-deposit-list-error') | ||||
.should('not.contain', | .should('not.contain', | ||||
'An error occurred while retrieving the list of deposits'); | 'An error occurred while retrieving the list of deposits'); | ||||
}); | }); | ||||
}); | }); | ||||
}); | }); |