Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/origin-save.spec.js
Show First 20 Lines • Show All 393 Lines • ▼ Show 20 Lines | cy.wait('@saveRequest').then(() => { | ||||
cy.get('#swh-input-visit-type') | cy.get('#swh-input-visit-type') | ||||
.should('have.value', goodVisitType); | .should('have.value', goodVisitType); | ||||
cy.get('#swh-input-origin-url') | cy.get('#swh-input-origin-url') | ||||
.should('have.value', $(cells[2]).text().slice(0, -1)); | .should('have.value', $(cells[2]).text().slice(0, -1)); | ||||
}); | }); | ||||
}); | }); | ||||
}); | }); | ||||
it('should create save request for authenticated user', function() { | |||||
cy.adminLogin(); | |||||
cy.visit(url); | |||||
const originUrl = 'https://git.example.org/account/repo'; | |||||
stubSaveRequest({requestUrl: this.Urls.api_1_save_origin('git', originUrl), | |||||
saveRequestStatus: 'accepted', | |||||
originUrl: origin.url, | |||||
saveTaskStatus: 'not yet scheduled'}); | |||||
makeOriginSaveRequest('git', originUrl); | |||||
cy.wait('@saveRequest').then(() => { | |||||
checkAlertVisible('success', saveCodeMsg['success']); | |||||
}); | |||||
}); | |||||
}); | }); |