Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/admin.spec.js
Show First 20 Lines • Show All 257 Lines • ▼ Show 20 Lines | cy.get('#swh-web-modal-confirm-ok-btn') | ||||
.click(); | .click(); | ||||
// checks rejection note has been saved to swh-web database | // checks rejection note has been saved to swh-web database | ||||
cy.request(this.Urls.api_1_save_origin('git', originUrl)) | cy.request(this.Urls.api_1_save_origin('git', originUrl)) | ||||
.then(response => { | .then(response => { | ||||
expect(response.body[0]['note']).to.equal(rejectionNote); | expect(response.body[0]['note']).to.equal(rejectionNote); | ||||
}); | }); | ||||
// check rejection note is displayed by clicking on the info icon | |||||
// in requests table from public save code now page | |||||
cy.visit(this.Urls.origin_save()); | |||||
cy.get('#swh-origin-save-requests-list-tab') | |||||
.click(); | |||||
cy.contains('#swh-origin-save-requests tr', originUrl); | |||||
cy.get('.swh-save-request-info') | |||||
.eq(0) | |||||
.click(); | |||||
cy.get('.popover-body') | |||||
.should('have.text', rejectionNote); | |||||
// remove rejected request from swh-web database to avoid side effects | // remove rejected request from swh-web database to avoid side effects | ||||
// in tests located in origin-save.spec.js | // in tests located in origin-save.spec.js | ||||
cy.visit(this.Urls.admin_origin_save()); | cy.visit(this.Urls.admin_origin_save()); | ||||
cy.get('#swh-save-requests-rejected-tab') | cy.get('#swh-save-requests-rejected-tab') | ||||
.click(); | .click(); | ||||
cy.contains('#swh-origin-save-rejected-requests', originUrl) | cy.contains('#swh-origin-save-rejected-requests', originUrl) | ||||
.click(); | .click(); | ||||
cy.get('#swh-remove-rejected-save-origin-request') | cy.get('#swh-remove-rejected-save-origin-request') | ||||
.click(); | .click(); | ||||
cy.get('#swh-web-modal-confirm-ok-btn') | cy.get('#swh-web-modal-confirm-ok-btn') | ||||
.click(); | .click(); | ||||
}); | }); | ||||
}); | }); |