test(WorkerPda): refs #5926 unify send and download e2e
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit
Details
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit
Details
This commit is contained in:
parent
7e0ca4ce6d
commit
057a2520c0
|
@ -13,7 +13,8 @@ describe('WorkerPda', () => {
|
|||
cy.checkNotification('PDA deallocated');
|
||||
});
|
||||
|
||||
it('send to docuware', () => {
|
||||
it('send and download pdf to docuware', () => {
|
||||
//Send
|
||||
cy.intercept('POST', '/api/Docuwares/upload-pda-pdf', (req) => {
|
||||
req.reply({
|
||||
statusCode: 200,
|
||||
|
@ -22,10 +23,30 @@ describe('WorkerPda', () => {
|
|||
});
|
||||
|
||||
creatNewPDA();
|
||||
|
||||
cy.dataCy('workerPda-send').click();
|
||||
confirmButton();
|
||||
cy.checkNotification('PDF sended to signed');
|
||||
|
||||
//Download
|
||||
cy.intercept('POST', /\/api\/Docuwares\/Jones%20Jessica\/checkFile/, (req) => {
|
||||
req.reply({
|
||||
statusCode: 200,
|
||||
body: {
|
||||
id: deviceId,
|
||||
state: 'Firmado',
|
||||
},
|
||||
});
|
||||
});
|
||||
cy.get('#st-actions').contains('refresh').click();
|
||||
cy.intercept('GET', '/api/Docuwares/download-pda-pdf**', (req) => {
|
||||
req.reply({
|
||||
statusCode: 200,
|
||||
body: {},
|
||||
});
|
||||
});
|
||||
|
||||
cy.dataCy('workerPda-download').click();
|
||||
removeNewPDA();
|
||||
});
|
||||
|
||||
|
@ -48,30 +69,6 @@ describe('WorkerPda', () => {
|
|||
removeNewPDA();
|
||||
});
|
||||
|
||||
it('download file', () => {
|
||||
cy.intercept('POST', /\/api\/Docuwares\/Jones%20Jessica\/checkFile/, (req) => {
|
||||
req.reply({
|
||||
statusCode: 200,
|
||||
body: {
|
||||
id: deviceId,
|
||||
state: 'Firmado',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
cy.intercept('GET', '/api/Docuwares/download-pda-pdf**', (req) => {
|
||||
req.reply({
|
||||
statusCode: 200,
|
||||
body: {},
|
||||
});
|
||||
});
|
||||
cy.get('#st-actions').contains('refresh').click();
|
||||
|
||||
creatNewPDA();
|
||||
cy.dataCy('workerPda-download').click();
|
||||
removeNewPDA();
|
||||
});
|
||||
|
||||
function creatNewPDA(id = deviceId) {
|
||||
cy.addBtnClick();
|
||||
cy.selectOption('[data-cy="pda-dialog-select"]', id);
|
||||
|
|
Loading…
Reference in New Issue