cau 10269 fix test and update fixtures
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
b24a6a6255
commit
4e27581045
|
@ -562,16 +562,16 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`)
|
||||||
(05080000, 'Coral y materiales similares' , 2, 2),
|
(05080000, 'Coral y materiales similares' , 2, 2),
|
||||||
(06021010, 'Plantas vivas: Esqueje/injerto, Vid', 1, 1);
|
(06021010, 'Plantas vivas: Esqueje/injerto, Vid', 1, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`item`(`id`, `name`,`typeFk`,`size`,`inkFk`,`category`,`stems`,`originFk`,`description`,`producerFk`,`intrastatFk`,`isOnOffer`,`expenceFk`,`isBargain`,`comment`,`relevancy`,`image`,`taxClassFk`,`longName`,`subName`,`tag5`,`value5`,`tag6`,`value6`,`tag7`,`value7`,`tag8`,`value8`)
|
INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`)
|
||||||
VALUES
|
VALUES
|
||||||
(1 , 'Object1 Gem1 5', 2, 70, 'AMA', 'EXT', 1 , 1, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, 'Object1 Gem1 5', NULL, 'Medida', '70', 'Color', 'Amarillo' , 'Categoria', 'EXT', 'Tallos', '1'),
|
(1 , 2, 70, 'AMA', 1 , 1, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, NULL),
|
||||||
(2 , 'Object2 Gem2 3', 2, 70, 'AZL', 'EXT', 1 , 2, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, 'Object2 Gem2 3', NULL, 'Medida', '70', 'Color', 'Azul' , 'Categoria', 'EXT', 'Tallos', '1'),
|
(2 , 2, 70, 'AZL', 1 , 2, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, NULL),
|
||||||
(3 , 'Object3 Armor 3', 1, 60, 'AMR', 'EXT', 1 , 3, 'Rhodeys armor', 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, 'Object3 Armor 3', NULL, 'Medida', '60', 'Color', 'Rosa/Amarillo', 'Categoria', 'EXT', 'Tallos', '1'),
|
(3 , 1, 60, 'AMR', 1 , 3, 'Rhodeys armor', 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, NULL),
|
||||||
(4 , 'Object4 Armor2 2', 1, 60, 'AMR', 'EXT', 1 , 1, 'Iron Mans first armor', 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, 'Object4 Armor2 2', NULL, 'Medida', '60', 'Color', 'Rosa/Amarillo', 'Categoria', 'EXT', 'Tallos', '1'),
|
(4 , 1, 60, 'AMR', 1 , 1, 'Iron Mans first armor', 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, NULL),
|
||||||
(5 , 'Object5 Weapon 50', 3, 30, 'GRE', 'EXT', 1 , 2, 'Thors hammer!', 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, 'Object5 Weapon 50', NULL, 'Medida', '30', 'Color', 'Azul' , 'Categoria', 'EXT', 'Tallos', '1'),
|
(5 , 3, 30, 'GRE', 1 , 2, 'Thors hammer!', 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL),
|
||||||
(6 , 'Broken Box', 5, 30, 'GRE', 'EXT', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, 'Broken Box', NULL, 'Medida', '30', 'Color', 'Gris' , NULL, NULL, NULL, NULL),
|
(6 , 5, 30, 'GRE', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
|
||||||
(7 , 'Legendary Box', 5, 90, 'AZL', 'EXT', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, 'Legendary Box', NULL, 'Medida', '90', 'Color', 'Gris' , NULL, NULL, NULL, NULL),
|
(7 , 5, 90, 'AZL', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
|
||||||
(71, 'ShippingCost', 4, NULL, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, NULL, 2, 'ShippingCost', NULL, NULL , NULL, NULL , NULL , NULL, NULL, NULL, NULL);
|
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, NULL, 2, NULL);
|
||||||
|
|
||||||
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
|
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -596,30 +596,30 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`,
|
||||||
|
|
||||||
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
|
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 1, 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(1, 1, 1, 'Ranged weapon longbow 2m', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(2, 2, 1, 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(2, 2, 1, 'Melee weapon combat first 15cm', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(3, 1, 1, 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(3, 1, 1, 'Ranged weapon longbow 2m', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(4, 4, 1, 'Object4 Armor2 2', 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(4, 4, 1, 'Melee weapon heavy shield 1x0.5m', 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(5, 1, 2, 'Object1 Gem1 5', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
|
(5, 1, 2, 'Ranged weapon longbow 2m', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
|
||||||
(6, 1, 3, 'Object1 Gem1 5', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
|
(6, 1, 3, 'Ranged weapon longbow 2m', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
|
||||||
(7, 2, 11, 'Object2 Gem2 3', 15, 1.46, 0, 0, 0, CURDATE()),
|
(7, 2, 11, 'Melee weapon combat first 15cm', 15, 1.46, 0, 0, 0, CURDATE()),
|
||||||
(8, 4, 11, 'Object4 Armor2 2', 10, 3.05, 0, 0, 0, CURDATE()),
|
(8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 3.05, 0, 0, 0, CURDATE()),
|
||||||
(9, 1, 16, 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, CURDATE()),
|
(9, 1, 16, 'Ranged weapon longbow 2m', 5, 9.10, 0, 0, 0, CURDATE()),
|
||||||
(10, 2, 16, 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, CURDATE()),
|
(10, 2, 16, 'Melee weapon combat first 15cm', 10, 1.07, 0, 0, 0, CURDATE()),
|
||||||
(11, 1, 16, 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, CURDATE()),
|
(11, 1, 16, 'Ranged weapon longbow 2m', 2, 9.10, 0, 0, 0, CURDATE()),
|
||||||
(12, 4, 16, 'Object4 Armor2 2', 20, 3.06, 0, 0, 0, CURDATE()),
|
(12, 4, 16, 'Melee weapon heavy shield 1x0.5m', 20, 3.06, 0, 0, 0, CURDATE()),
|
||||||
(13, 2, 8, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
(13, 2, 8, 'Melee weapon combat first 15cm', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(14, 1, 8, 'Object1 Gem1 5', 10, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
(14, 1, 8, 'Ranged weapon longbow 2m', 10, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(15, 1, 19, 'Object1 Gem1 5', 10, 1.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
(15, 1, 19, 'Ranged weapon longbow 2m', 10, 1.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||||
(16, 2, 20, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
(16, 2, 20, 'Melee weapon combat first 15cm', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||||
(17, 2, 22, 'Object2 Gem2 3', 30, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
(17, 2, 22, 'Melee weapon combat first 15cm', 30, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||||
(18, 4, 22, 'Object4 Armor2 2', 20, 3.00, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
(18, 4, 22, 'Melee weapon heavy shield 1x0.5m', 20, 3.00, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||||
(19, 1, 4, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -4 DAY)),
|
(19, 1, 4, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -4 DAY)),
|
||||||
(20, 1, 5, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 DAY)),
|
(20, 1, 5, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 DAY)),
|
||||||
(21, 1, 6, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 DAY)),
|
(21, 1, 6, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 DAY)),
|
||||||
(22, 1, 7, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 DAY)),
|
(22, 1, 7, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 DAY)),
|
||||||
(23, 1, 9, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
(23, 1, 9, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
||||||
(24, 1, 10, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH));
|
(24, 1, 10, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH));
|
||||||
|
|
||||||
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
|
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -660,7 +660,7 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||||
(7, 28, 5.6),
|
(7, 28, 5.6),
|
||||||
(7, 29, -4.6),
|
(7, 29, -4.6),
|
||||||
(7, 39, 0.01),
|
(7, 39, 0.01),
|
||||||
(8, 15, 0.0426),
|
(8, 15, 0.039),
|
||||||
(8, 21, -0.003),
|
(8, 21, -0.003),
|
||||||
(8, 28, 20.72),
|
(8, 28, 20.72),
|
||||||
(8, 29, -19.72),
|
(8, 29, -19.72),
|
||||||
|
@ -791,41 +791,56 @@ INSERT INTO `vn`.`itemBotanical`(`itemFk`, `botanical`, `genusFk`, `specieFk`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
VALUES
|
VALUES
|
||||||
(1 , 1, 56, 'Object1', 1),
|
(1 , 1, 56, 'Ranged weapon', 1),
|
||||||
(2 , 1, 58, 'Gem1' , 2),
|
(2 , 1, 58, 'longbow', 2),
|
||||||
(3 , 1, 27, '5' , 3),
|
(3 , 1, 27, '2m', 3),
|
||||||
(4 , 1, 36, 'Marvel1', 4),
|
(4 , 1, 36, 'Stark Industries', 4),
|
||||||
(5 , 1, 1 , 'Yellow' , 5),
|
(5 , 1, 1, 'Brown', 5),
|
||||||
(6 , 1, 67 , 'A1' , 6),
|
(6 , 1, 67, 'precission', 6),
|
||||||
(7 , 1, 23, '0' , 7),
|
(7 , 1, 23, '1', 7),
|
||||||
(8 , 2, 56, 'Object2', 1),
|
(8 , 2, 56, 'Melee weapon', 1),
|
||||||
(9 , 2, 58, 'Gem2' , 2),
|
(9 , 2, 58, 'combat first', 2),
|
||||||
(10, 2, 27 , '3' , 3),
|
(10, 2, 27, '15cm', 3),
|
||||||
(11, 2, 36, 'Marvel2', 4),
|
(11, 2, 36, 'Stark Industries', 4),
|
||||||
(12, 2, 1 , 'Red' , 5),
|
(12, 2, 1, 'Silver', 5),
|
||||||
(13, 2, 67, 'A1' , 6),
|
(13, 2, 67, 'concussion', 6),
|
||||||
(14, 2, 23, '0' , 7),
|
(14, 2, 23, '1', 7),
|
||||||
(15, 3, 56, 'Object3', 1),
|
(15, 3, 56, 'Ranged weapon', 1),
|
||||||
(16, 3, 58, 'Armor' , 2),
|
(16, 3, 58, 'sniper rifle', 2),
|
||||||
(17, 3, 4, '3' , 3),
|
(17, 3, 4, '300mm', 3),
|
||||||
(18, 3, 36, 'Stark' , 4),
|
(18, 3, 36, 'Stark Industries', 4),
|
||||||
(19, 3, 1 , 'Green' , 5),
|
(19, 3, 1, 'Green', 5),
|
||||||
(20, 3, 67, 'EXT' , 6),
|
(20, 3, 67, 'precission', 6),
|
||||||
(21, 3, 23, '0' , 7),
|
(21, 3, 23, '1', 7),
|
||||||
(22, 4, 56, 'Object4', 1),
|
(22, 4, 56, 'Melee weapon', 1),
|
||||||
(23, 4, 58, 'Armor2' , 2),
|
(23, 4, 58, 'heavy shield', 2),
|
||||||
(24, 4, 4, '2' , 3),
|
(24, 4, 4, '1x0.5m', 3),
|
||||||
(25, 4, 36, 'Stark' , 4),
|
(25, 4, 36, 'Stark Industries', 4),
|
||||||
(26, 4, 1 , 'Blue' , 5),
|
(26, 4, 1, 'Black', 5),
|
||||||
(27, 4, 67, 'EXT' , 6),
|
(27, 4, 67, 'containtment', 6),
|
||||||
(28, 4, 23, '1' , 7),
|
(28, 4, 23, '1', 7),
|
||||||
(29, 5, 56, 'Object5', 1),
|
(29, 5, 56, 'Ranged weapon', 1),
|
||||||
(30, 5, 58, 'Weapon' , 2),
|
(30, 5, 58, 'pistol', 2),
|
||||||
(31, 5, 27 , '50' , 3),
|
(31, 5, 27, '9mm', 3),
|
||||||
(32, 5, 36, 'Thor' , 4),
|
(32, 5, 36, 'Stark Industries', 4),
|
||||||
(33, 5, 1 , 'Grey' , 5),
|
(33, 5, 1, 'Silver', 5),
|
||||||
(34, 5, 67, 'EXT' , 6),
|
(34, 5, 67, 'rapid fire', 6),
|
||||||
(35, 5, 23, '1' , 7);
|
(35, 5, 23, '1', 7),
|
||||||
|
(36, 6, 56, 'Container', 1),
|
||||||
|
(37, 6, 58, 'ammo box', 2),
|
||||||
|
(38, 6, 27, '1m', 3),
|
||||||
|
(39, 6, 36, 'Stark Industries', 4),
|
||||||
|
(40, 6, 1, 'Green', 5),
|
||||||
|
(41, 6, 67, 'supply', 6),
|
||||||
|
(42, 6, 23, '1', 7),
|
||||||
|
(43, 7, 56, 'Container', 1),
|
||||||
|
(44, 7, 58, 'medical box', 2),
|
||||||
|
(45, 7, 27, '1m', 3),
|
||||||
|
(46, 7, 36, 'Stark Industries', 4),
|
||||||
|
(47, 7, 1, 'White', 5),
|
||||||
|
(48, 7, 67, 'supply', 6),
|
||||||
|
(49, 7, 23, '1', 7),
|
||||||
|
(50, 71, 92, 'Shipping cost', 2);
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
|
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1170,10 +1185,10 @@ INSERT INTO `vn2008`.`workerTeam`(`id`, `team`, `user`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `atenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `atenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'Object1 Gem1 5', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(1, 'Ranged weapon longbow 2m', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(2, 'Object2 Gem2 3', 18, 35, 10, 2, 1.07, 0, NULL, 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, 'Object4 Armor2 2', 18, 35, 20, 4, 3.06, 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, 'Object2 Gem2 3', 18, 35, 15, 2, 1.30, NULL, NULL, 11, CURDATE());
|
(4, 'Melee weapon combat first 15cm', 18, 35, 15, 2, 1.30, NULL, NULL, 11, CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxClassFk`, `ticketFk`)
|
INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxClassFk`, `ticketFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe('Item summary path', () => {
|
||||||
|
|
||||||
it('should search for an item', async() => {
|
it('should search for an item', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.write(selectors.itemsIndex.searchItemInput, 'Object1 Gem1 5')
|
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon longbow 2m')
|
||||||
.waitToClick(selectors.itemsIndex.searchButton)
|
.waitToClick(selectors.itemsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
.countElement(selectors.itemsIndex.searchResult);
|
.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
@ -21,7 +21,7 @@ describe('Item summary path', () => {
|
||||||
|
|
||||||
it(`should click on the search result summary button to open the item summary popup`, async() => {
|
it(`should click on the search result summary button to open the item summary popup`, async() => {
|
||||||
const isVisibleBefore = await nightmare
|
const isVisibleBefore = await nightmare
|
||||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object1 Gem1 5')
|
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon longbow 2m')
|
||||||
.isVisible(selectors.itemSummary.basicData);
|
.isVisible(selectors.itemSummary.basicData);
|
||||||
|
|
||||||
const isVisibleAfter = await nightmare
|
const isVisibleAfter = await nightmare
|
||||||
|
@ -34,18 +34,18 @@ describe('Item summary path', () => {
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from basic data`, async() => {
|
it(`should check the item summary preview shows fields from basic data`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.basicData, 'Object1 Gem1 5')
|
.waitForTextInElement(selectors.itemSummary.basicData, 'Ranged weapon longbow 2m')
|
||||||
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Object1 Gem1 5');
|
expect(result).toContain('Ranged weapon longbow 2m');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from tags`, async() => {
|
it(`should check the item summary preview shows fields from tags`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.tags, 'Yellow')
|
.waitForTextInElement(selectors.itemSummary.tags, 'Brown')
|
||||||
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Yellow');
|
expect(result).toContain('Brown');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from niche`, async() => {
|
it(`should check the item summary preview shows fields from niche`, async() => {
|
||||||
|
@ -84,7 +84,7 @@ describe('Item summary path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.clearInput('vn-item-index vn-searchbar input')
|
.clearInput('vn-item-index vn-searchbar input')
|
||||||
.waitToClick(selectors.itemsIndex.searchButton)
|
.waitToClick(selectors.itemsIndex.searchButton)
|
||||||
.write(selectors.itemsIndex.searchItemInput, 'Object2 Gem2 3')
|
.write(selectors.itemsIndex.searchItemInput, 'Melee weapon combat first 15cm')
|
||||||
.waitToClick(selectors.itemsIndex.searchButton)
|
.waitToClick(selectors.itemsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
.countElement(selectors.itemsIndex.searchResult);
|
.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
@ -94,7 +94,7 @@ describe('Item summary path', () => {
|
||||||
|
|
||||||
it(`should now click on the search result summary button to open the item summary popup`, async() => {
|
it(`should now click on the search result summary button to open the item summary popup`, async() => {
|
||||||
const isVisibleBefore = await nightmare
|
const isVisibleBefore = await nightmare
|
||||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object2 Gem2 3')
|
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Melee weapon combat first 15cm')
|
||||||
.isVisible(selectors.itemSummary.basicData);
|
.isVisible(selectors.itemSummary.basicData);
|
||||||
|
|
||||||
const isVisibleAfter = await nightmare
|
const isVisibleAfter = await nightmare
|
||||||
|
@ -108,18 +108,18 @@ describe('Item summary path', () => {
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from basic data`, async() => {
|
it(`should now check the item summary preview shows fields from basic data`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.basicData, 'Object2 Gem2 3')
|
.waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat first 15cm')
|
||||||
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Object2 Gem2 3');
|
expect(result).toContain('Melee weapon combat first 15cm');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from tags`, async() => {
|
it(`should now check the item summary preview shows fields from tags`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.tags, 'Red')
|
.waitForTextInElement(selectors.itemSummary.tags, 'Silver')
|
||||||
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Red');
|
expect(result).toContain('Silver');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from niche`, async() => {
|
it(`should now check the item summary preview shows fields from niche`, async() => {
|
||||||
|
@ -172,17 +172,17 @@ describe('Item summary path', () => {
|
||||||
|
|
||||||
it(`should check the item summary shows fields from basic data section`, async() => {
|
it(`should check the item summary shows fields from basic data section`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.basicData, 'Object2 Gem2 3')
|
.waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat first 15cm')
|
||||||
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Object2 Gem2 3');
|
expect(result).toContain('Melee weapon combat first 15cm');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary shows fields from tags section`, async() => {
|
it(`should check the item summary shows fields from tags section`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Red');
|
expect(result).toContain('Silver');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary shows fields from niches section`, async() => {
|
it(`should check the item summary shows fields from niches section`, async() => {
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item Edit basic data path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Object2 Gem2 3')
|
.accessToSearchResult('Melee weapon combat first 15cm')
|
||||||
.accessToSection('item.card.data');
|
.accessToSection('item.card.data');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item edit tax path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Object1 Gem1 5')
|
.accessToSearchResult('Ranged weapon longbow 2m')
|
||||||
.accessToSection('item.card.tax');
|
.accessToSection('item.card.tax');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item create tags path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Object1 Gem1 5')
|
.accessToSearchResult('Ranged weapon longbow 2m')
|
||||||
.accessToSection('item.card.tags');
|
.accessToSection('item.card.tags');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ describe('Item create tags path', () => {
|
||||||
.waitToGetProperty(selectors.itemTags.fifthRelevancyInput, 'value');
|
.waitToGetProperty(selectors.itemTags.fifthRelevancyInput, 'value');
|
||||||
|
|
||||||
expect(tag).toEqual('Color');
|
expect(tag).toEqual('Color');
|
||||||
expect(value).toEqual('Yellow');
|
expect(value).toEqual('Brown');
|
||||||
expect(relevancy).toEqual('5');
|
expect(relevancy).toEqual('5');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ describe('Item create tags path', () => {
|
||||||
.waitToGetProperty(selectors.itemTags.sixthRelevancyInput, 'value');
|
.waitToGetProperty(selectors.itemTags.sixthRelevancyInput, 'value');
|
||||||
|
|
||||||
expect(tag).toEqual('Categoria');
|
expect(tag).toEqual('Categoria');
|
||||||
expect(value).toEqual('A1');
|
expect(value).toEqual('precission');
|
||||||
expect(relevancy).toEqual('6');
|
expect(relevancy).toEqual('6');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item create niche path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Object1 Gem1 5')
|
.accessToSearchResult('Ranged weapon longbow 2m')
|
||||||
.accessToSection('item.card.niche');
|
.accessToSection('item.card.niche');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item Create botanical path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Object5 Weapon 50')
|
.accessToSearchResult('Ranged weapon pistol 9mm')
|
||||||
.accessToSection('item.card.botanical');
|
.accessToSection('item.card.botanical');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item Create barcodes path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Object1 Gem1 5')
|
.accessToSearchResult('Ranged weapon longbow 2m')
|
||||||
.accessToSection('item.card.itemBarcode');
|
.accessToSection('item.card.itemBarcode');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ xdescribe('Item regularize path', () => {
|
||||||
|
|
||||||
it('should search for the item', async() => {
|
it('should search for the item', async() => {
|
||||||
const resultCount = await nightmare
|
const resultCount = await nightmare
|
||||||
.write(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
|
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon pistol 9mm')
|
||||||
.waitToClick(selectors.itemsIndex.searchButton)
|
.waitToClick(selectors.itemsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
.countElement(selectors.itemsIndex.searchResult);
|
.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
@ -39,7 +39,7 @@ xdescribe('Item regularize path', () => {
|
||||||
|
|
||||||
it(`should click on the search result to access to the item tax`, async() => {
|
it(`should click on the search result to access to the item tax`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object5 Weapon 50')
|
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon pistol 9mm')
|
||||||
.waitToClick(selectors.itemsIndex.searchResult)
|
.waitToClick(selectors.itemsIndex.searchResult)
|
||||||
.waitForURL('/summary')
|
.waitForURL('/summary')
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
@ -134,7 +134,7 @@ xdescribe('Item regularize path', () => {
|
||||||
|
|
||||||
it('should search for the item once again', async() => {
|
it('should search for the item once again', async() => {
|
||||||
const resultCount = await nightmare
|
const resultCount = await nightmare
|
||||||
.write(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
|
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon pistol 9mm')
|
||||||
.waitToClick(selectors.itemsIndex.searchButton)
|
.waitToClick(selectors.itemsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
.countElement(selectors.itemsIndex.searchResult);
|
.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
@ -144,7 +144,7 @@ xdescribe('Item regularize path', () => {
|
||||||
|
|
||||||
it(`should click on the search result to access to the item tax`, async() => {
|
it(`should click on the search result to access to the item tax`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object5 Weapon 50')
|
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon pistol 9mm')
|
||||||
.waitToClick(selectors.itemsIndex.searchResult)
|
.waitToClick(selectors.itemsIndex.searchResult)
|
||||||
.waitForURL('/summary')
|
.waitForURL('/summary')
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe('Ticket List sale path', () => {
|
||||||
const value = await nightmare
|
const value = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleColour, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSaleColour, 'innerText');
|
||||||
|
|
||||||
expect(value).toContain('Yellow');
|
expect(value).toContain('Silver');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the lenght', async() => {
|
it('should confirm the first ticket sale contains the lenght', async() => {
|
||||||
|
@ -29,7 +29,7 @@ describe('Ticket List sale path', () => {
|
||||||
const value = await nightmare
|
const value = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSalePrice, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSalePrice, 'innerText');
|
||||||
|
|
||||||
expect(value).toContain('2.30');
|
expect(value).toContain('1.30');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the discount', async() => {
|
it('should confirm the first ticket sale contains the discount', async() => {
|
||||||
|
@ -43,7 +43,7 @@ describe('Ticket List sale path', () => {
|
||||||
const value = await nightmare
|
const value = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleImport, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSaleImport, 'innerText');
|
||||||
|
|
||||||
expect(value).toContain('23');
|
expect(value).toContain('19.50');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should navigate to the catalog by pressing the new item button', async() => {
|
it('should navigate to the catalog by pressing the new item button', async() => {
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe('Ticket Create packages path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketPackages.firstRemovePackageButton)
|
.waitToClick(selectors.ticketPackages.firstRemovePackageButton)
|
||||||
.waitToClick(selectors.ticketPackages.addPackageButton)
|
.waitToClick(selectors.ticketPackages.addPackageButton)
|
||||||
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Legendary Box')
|
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Container medical box 1m')
|
||||||
.waitToClick(selectors.ticketPackages.savePackagesButton)
|
.waitToClick(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ describe('Ticket Create packages path', () => {
|
||||||
|
|
||||||
it(`should create a new package with correct data`, async() => {
|
it(`should create a new package with correct data`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Legendary Box')
|
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Container medical box 1m')
|
||||||
.waitToClick(selectors.ticketPackages.savePackagesButton)
|
.waitToClick(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -64,10 +64,10 @@ describe('Ticket Create packages path', () => {
|
||||||
it(`should confirm the first select is the expected one`, async() => {
|
it(`should confirm the first select is the expected one`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.reloadSection('ticket.card.package.index')
|
.reloadSection('ticket.card.package.index')
|
||||||
.waitForTextInInput(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'Legendary Box')
|
.waitForTextInInput(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'Container medical box 1m')
|
||||||
.waitToGetProperty(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'value');
|
.waitToGetProperty(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('7 : Legendary Box');
|
expect(result).toEqual('7 : Container medical box 1m');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the first quantity is the expected one`, async() => {
|
it(`should confirm the first quantity is the expected one`, async() => {
|
||||||
|
|
|
@ -73,7 +73,7 @@ describe('Ticket Edit basic data path', () => {
|
||||||
.wait(1900)
|
.wait(1900)
|
||||||
.waitToGetProperty(selectors.ticketBasicData.stepTwoTotalPriceDif, 'innerText');
|
.waitToGetProperty(selectors.ticketBasicData.stepTwoTotalPriceDif, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('-€204.25');
|
expect(result).toContain('-€202.25');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should then click next to move on to step three`, async() => {
|
it(`should then click next to move on to step three`, async() => {
|
||||||
|
|
|
@ -311,7 +311,7 @@ xdescribe('Ticket Edit sale path', () => {
|
||||||
.wait(selectors.ticketSales.firstSaleText)
|
.wait(selectors.ticketSales.firstSaleText)
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleText, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSaleText, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain(`Object4 Armor2 2`);
|
expect(result).toContain(`Melee weapon heavy shield 1x0.5m`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should go back to the original ticket sales section', async() => {
|
it('should go back to the original ticket sales section', async() => {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('item filterItemTags()', () => {
|
describe('item filterItemTags()', () => {
|
||||||
it('should filter ItemTags table', async () => {
|
it('should filter ItemTags table', async() => {
|
||||||
let [result] = await app.models.ItemTag.filterItemTags(1, {});
|
let [result] = await app.models.ItemTag.filterItemTags(1, {});
|
||||||
|
|
||||||
expect(result.value).toEqual('Blue');
|
expect(result.value).toEqual('Black');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,12 +6,12 @@ describe('item filter()', () => {
|
||||||
order: 'isActive ASC, name',
|
order: 'isActive ASC, name',
|
||||||
limit: 8
|
limit: 8
|
||||||
};
|
};
|
||||||
let tags = [{value: 'Gem2', tagFk: 58}];
|
let tags = [{value: 'combat first', tagFk: 58}];
|
||||||
let result = await app.models.Item.filter({args: {filter: filter, typeFk: 2, tags: tags}});
|
let result = await app.models.Item.filter({args: {filter: filter, typeFk: 2, tags: tags}});
|
||||||
|
|
||||||
expect(result.length).toEqual(1);
|
expect(result.length).toEqual(1);
|
||||||
expect(result[0].id).toEqual(2);
|
expect(result[0].id).toEqual(2);
|
||||||
expect(result[0].name).toEqual('Object2 Gem2 3');
|
expect(result[0].name).toEqual('Melee weapon combat first 15cm');
|
||||||
expect(result[0].type).toEqual('Anthurium');
|
expect(result[0].type).toEqual('Anthurium');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,10 +14,10 @@ describe('order catalogFilter()', () => {
|
||||||
let firstItemId = result[0].id;
|
let firstItemId = result[0].id;
|
||||||
|
|
||||||
expect(result.length).toEqual(2);
|
expect(result.length).toEqual(2);
|
||||||
expect(firstItemId).toEqual(2);
|
expect(firstItemId).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return an array of items based on tag filter', async() => {
|
it('should now return an array of items based on tag filter', async() => {
|
||||||
let filter = {
|
let filter = {
|
||||||
where: {
|
where: {
|
||||||
categoryFk: 1,
|
categoryFk: 1,
|
||||||
|
@ -25,7 +25,7 @@ describe('order catalogFilter()', () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let tags = [{tagFk: 56, value: 'Object2'}];
|
let tags = [{tagFk: 56, value: 'Melee weapon'}];
|
||||||
let orderFk = 11;
|
let orderFk = 11;
|
||||||
let orderBy = {field: 'relevancy DESC, name', way: 'DESC'};
|
let orderBy = {field: 'relevancy DESC, name', way: 'DESC'};
|
||||||
let result = await app.models.Order.catalogFilter(orderFk, orderBy, filter, tags);
|
let result = await app.models.Order.catalogFilter(orderFk, orderBy, filter, tags);
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('ticket listPackaging()', () => {
|
describe('ticket listPackaging()', () => {
|
||||||
it('should call the listPackaging method and return the response', async () => {
|
it('should call the listPackaging method and return the response', async() => {
|
||||||
let filter = {where: {packagingFk: 1}};
|
let filter = {where: {packagingFk: 1}};
|
||||||
let response = await app.models.Packaging.listPackaging(filter);
|
let response = await app.models.Packaging.listPackaging(filter);
|
||||||
|
|
||||||
expect(response[0].name).toBeDefined();
|
expect(response[0].name).toBeDefined();
|
||||||
expect(response[0].name).toEqual('Broken Box');
|
expect(response[0].name).toEqual('Container ammo box 1m');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe('ticket listSaleTracking()', () => {
|
||||||
let filter = {where: {ticketFk: 1}};
|
let filter = {where: {ticketFk: 1}};
|
||||||
let result = await app.models.SaleTracking.listSaleTracking(filter);
|
let result = await app.models.SaleTracking.listSaleTracking(filter);
|
||||||
|
|
||||||
expect(result[0].concept).toEqual('Object1 Gem1 5');
|
expect(result[0].concept).toEqual('Ranged weapon longbow 2m');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should call the listSaleTracking method and return zero if doesn't have lines`, async() => {
|
it(`should call the listSaleTracking method and return zero if doesn't have lines`, async() => {
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('sale getClaimableFromTicket()', () => {
|
||||||
it('should return the claimable sales of a given ticket', async() => {
|
it('should return the claimable sales of a given ticket', async() => {
|
||||||
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
|
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
|
||||||
|
|
||||||
expect(claimableFromTicket[0].concept).toBe('Object1 Gem1 5');
|
expect(claimableFromTicket[0].concept).toBe('Ranged weapon longbow 2m');
|
||||||
expect(claimableFromTicket.length).toBe(3);
|
expect(claimableFromTicket.length).toBe(3);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,6 @@ describe('ticket getSales()', () => {
|
||||||
expect(sales[1].tags).toBeDefined();
|
expect(sales[1].tags).toBeDefined();
|
||||||
expect(sales[2].tags).toBeDefined();
|
expect(sales[2].tags).toBeDefined();
|
||||||
expect(sales[3].tags).toBeDefined();
|
expect(sales[3].tags).toBeDefined();
|
||||||
expect(sales[2].claim).toBeDefined();
|
expect(sales[0].claim).toBeDefined();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue