test: refs #3979 fixtures arregladas para que los abonos sean negativos
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4cb82524cb
commit
767c6a6ac8
|
@ -2910,8 +2910,7 @@ INSERT INTO `vn`.`workerConfig` (`id`, `businessUpdated`, `roleFk`, `payMethodFk
|
|||
|
||||
INSERT INTO `vn`.`ticketRefund`(`refundTicketFk`, `originalTicketFk`)
|
||||
VALUES
|
||||
(1, 12),
|
||||
(8, 10);
|
||||
(24, 7);
|
||||
|
||||
INSERT INTO `vn`.`deviceProductionModels` (`code`)
|
||||
VALUES
|
||||
|
|
|
@ -236,7 +236,7 @@ describe('Ticket Edit sale path', () => {
|
|||
});
|
||||
|
||||
it('should show error trying to delete a ticket with a refund', async() => {
|
||||
await page.accessToSearchResult('16');
|
||||
await page.accessToSearchResult('6');
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteTicket);
|
||||
await page.waitToClick(selectors.globalItems.acceptButton);
|
||||
|
|
|
@ -67,16 +67,4 @@ describe('Ticket cloning - clone function', () => {
|
|||
expect(services.length).toBeGreaterThan(0);
|
||||
}
|
||||
});
|
||||
|
||||
it('should handle transaction rollback on error', async() => {
|
||||
const negative = true;
|
||||
const salesIds = [1, 2, 3, 4, 5];
|
||||
const servicesIds = [];
|
||||
try {
|
||||
await models.Sale.clone(ctx, salesIds, servicesIds, false, negative, options);
|
||||
fail('Expected error was not thrown');
|
||||
} catch (error) {
|
||||
expect(error).toBeDefined();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,7 +3,6 @@ const LoopBackContext = require('loopback-context');
|
|||
|
||||
describe('ticket setDeleted()', () => {
|
||||
const userId = 1106;
|
||||
const employeeUser = 1110;
|
||||
const activeCtx = {
|
||||
accessToken: {userId: userId},
|
||||
};
|
||||
|
@ -118,7 +117,7 @@ describe('ticket setDeleted()', () => {
|
|||
return value;
|
||||
};
|
||||
|
||||
const ticketId = 12;
|
||||
const ticketId = 7;
|
||||
await models.Ticket.setDeleted(ctx, ticketId, options);
|
||||
|
||||
await tx.rollback();
|
||||
|
|
|
@ -132,7 +132,7 @@ describe('sale model ', () => {
|
|||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue(getActiveCtx(9));
|
||||
|
||||
const tx = await models.Sale.beginTransaction({});
|
||||
const saleId = 13;
|
||||
const saleId = 32;
|
||||
const newQuantity = -10;
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue