3979-abonarTicketsSinAlmacen #1910

Merged
jgallego merged 8 commits from 3979-abonarTicketsSinAlmacen into dev 2024-01-11 12:39:28 +00:00
5 changed files with 4 additions and 18 deletions
Showing only changes of commit 767c6a6ac8 - Show all commits

View File

@ -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

View File

@ -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);

View File

@ -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();
}
});
});

View File

@ -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();

View File

@ -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 {