Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8581-invoiceinE2e
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
commit
749b157fcf
|
@ -176,12 +176,10 @@ const getSaleTotal = (sale) => {
|
||||||
|
|
||||||
const getRowUpdateInputEvents = (sale) => {
|
const getRowUpdateInputEvents = (sale) => {
|
||||||
return {
|
return {
|
||||||
'keyup.enter': (evt) => {
|
'keyup.enter': () => {
|
||||||
console.error(evt);
|
|
||||||
changeQuantity(sale);
|
changeQuantity(sale);
|
||||||
},
|
},
|
||||||
blur: (evt) => {
|
blur: () => {
|
||||||
console.error(evt);
|
|
||||||
changeQuantity(sale);
|
changeQuantity(sale);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,12 +24,21 @@ describe('Logout', () => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
statusMessage: 'AUTHORIZATION_REQUIRED',
|
statusMessage: 'AUTHORIZATION_REQUIRED',
|
||||||
});
|
}).as('badRequest');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('when token not exists', () => {
|
it('when token not exists', () => {
|
||||||
|
const exceptionHandler = (err) => {
|
||||||
|
if (err.code === 'AUTHORIZATION_REQUIRED') return;
|
||||||
|
};
|
||||||
|
Cypress.on('uncaught:exception', exceptionHandler);
|
||||||
|
|
||||||
cy.get('.q-list').first().should('be.visible').click();
|
cy.get('.q-list').first().should('be.visible').click();
|
||||||
|
cy.wait('@badRequest');
|
||||||
|
|
||||||
cy.checkNotification('Authorization Required');
|
cy.checkNotification('Authorization Required');
|
||||||
|
|
||||||
|
Cypress.off('uncaught:exception', exceptionHandler);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -152,22 +152,6 @@ describe('TicketSale', () => {
|
||||||
cy.checkNotification('Future ticket date not allowed');
|
cy.checkNotification('Future ticket date not allowed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('marks row as reserved', () => {
|
|
||||||
selectFirstRow();
|
|
||||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
|
||||||
cy.waitForElement('[data-cy="markAsReservedItem"]');
|
|
||||||
cy.dataCy('markAsReservedItem').click();
|
|
||||||
cy.dataCy('ticketSaleReservedIcon').should('exist');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('unmarks row as reserved', () => {
|
|
||||||
selectFirstRow();
|
|
||||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
|
||||||
cy.waitForElement('[data-cy="unmarkAsReservedItem"]');
|
|
||||||
cy.dataCy('unmarkAsReservedItem').click();
|
|
||||||
cy.dataCy('ticketSaleReservedIcon').should('not.exist');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('refunds row with warehouse', () => {
|
it('refunds row with warehouse', () => {
|
||||||
selectFirstRow();
|
selectFirstRow();
|
||||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
||||||
|
|
|
@ -40,6 +40,11 @@ style.innerHTML = `
|
||||||
`;
|
`;
|
||||||
document.head.appendChild(style);
|
document.head.appendChild(style);
|
||||||
|
|
||||||
|
// FIXME: https://redmine.verdnatura.es/issues/8771
|
||||||
|
Cypress.on('uncaught:exception', (err) => {
|
||||||
|
if (err.code === 'ERR_CANCELED') return false;
|
||||||
|
});
|
||||||
|
|
||||||
const waitForApiReady = (url, maxRetries = 20, delay = 1000) => {
|
const waitForApiReady = (url, maxRetries = 20, delay = 1000) => {
|
||||||
let retries = 0;
|
let retries = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue