Bug/Test #1607 ticket.updateDiscount and fix test
gitea/salix/dev This commit has test failures
Details
gitea/salix/dev This commit has test failures
Details
This commit is contained in:
parent
788a8ade47
commit
7571cd6e1b
|
@ -1444,7 +1444,8 @@ INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `atenderFk`
|
|||
(1, 'Ranged weapon longbow 2m', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||
(2, 'Melee weapon combat first 15cm', 18, 35, 10, 2, 1.07, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||
(3, 'Melee weapon heavy shield 1x0.5m', 18, 35, 20, 4, 3.06, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||
(4, 'Melee weapon combat first 15cm', 18, 35, 15, NULL, 1.30, NULL, NULL, 11, CURDATE());
|
||||
(4, 'Melee weapon combat first 15cm', 18, 35, 15, NULL, 1.30, NULL, NULL, 11, CURDATE()),
|
||||
(5, 'Melee weapon combat first 15cm', 18, 35, 15, 4, 1.30, 0, NULL, 18, CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`ticketServiceType`(`id`, `name`)
|
||||
VALUES
|
||||
|
|
|
@ -381,6 +381,7 @@ describe('Worker time control path', () => {
|
|||
|
||||
it(`should check Hank Pym doesn't have hours set on the next months first week`, async() => {
|
||||
const wholeWeekHours = await nightmare
|
||||
.waitToClick(selectors.workerTimeControl.nextMonthButton)
|
||||
.waitToClick(selectors.workerTimeControl.nextMonthButton)
|
||||
.waitToGetProperty(selectors.workerTimeControl.weekWorkedHours, 'innerText');
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ module.exports = Self => {
|
|||
false
|
||||
]);
|
||||
|
||||
if (stock.available < ctx.args.quantity)
|
||||
if (stock.available < 0)
|
||||
throw new UserError(`This item is not available`);
|
||||
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ describe('ticket-request confirm()', () => {
|
|||
});
|
||||
|
||||
it(`should throw an error if the item is not available`, async() => {
|
||||
const requestId = 4;
|
||||
const itemId = 1;
|
||||
const requestId = 5;
|
||||
const itemId = 4;
|
||||
const quantity = 99999;
|
||||
|
||||
let ctx = {req: {accessToken: {userId: 9}}, args: {
|
||||
|
|
|
@ -6,7 +6,7 @@ describe('ticket-request filter()', () => {
|
|||
|
||||
let result = await app.models.TicketRequest.filter(ctx);
|
||||
|
||||
expect(result.length).toEqual(1);
|
||||
expect(result.length).toEqual(2);
|
||||
});
|
||||
|
||||
it('should return the ticket request matching a generic search value which is the ticket ID', async() => {
|
||||
|
|
|
@ -54,7 +54,6 @@ module.exports = Self => {
|
|||
line.item = map[line.itemFk];
|
||||
line.claim = claimMap[line.id];
|
||||
}
|
||||
|
||||
return lines;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
</vn-icon>
|
||||
</a>
|
||||
<vn-icon
|
||||
ng-show="!sale.visible || !sale.available || sale.visible < 0 || sale.available < 0"
|
||||
ng-show=" sale.visible < 0 || sale.available < 0"
|
||||
color-main
|
||||
icon="warning"
|
||||
vn-tooltip="Visible: {{::sale.visible || 0}} <br> {{::$ctrl.$translate.instant('Available')}}: {{::sale.available || 0}}">
|
||||
|
|
Loading…
Reference in New Issue