update fixtures with inserts in company and refactor e2e

This commit is contained in:
Bernat 2018-04-13 08:11:40 +02:00
parent 8f7ee50109
commit e377562d99
4 changed files with 37 additions and 14 deletions

View File

@ -52,7 +52,7 @@ describe('Client', () => {
.getInnerText(selectors.clientMandate.firstMandateText)
.then(value => {
expect(value).toContain('1');
expect(value).toContain('WAY');
expect(value).toContain('VNL');
expect(value).toContain('CORE');
});
});

View File

@ -51,7 +51,7 @@ describe('Client', () => {
.wait(selectors.clientInvoices.firstInvoiceText)
.getInnerText(selectors.clientInvoices.firstInvoiceText)
.then(value => {
expect(value).toContain('V1800001');
expect(value).toContain('V2800001');
expect(value).toContain('350.50');
});
});

View File

@ -266,22 +266,30 @@ INSERT INTO `vn2008`.`empresa_grupo`(`empresa_grupo_id`, `grupo`)
VALUES
(1, 'Wayne Industries');
INSERT INTO `vn2008`.`empresa`(`id`, `abbreviation`, `registro`, `gerente_id`, `alta`, `baja`, `logo`, `oficial`, `cyc`, `rgb`, `mail`, `cuno`, `ODBC_DATE`, `Id_Cliente`, `digito_factura`, `Id_Proveedores_account`, `morosidad`, `empresa_grupo`)
/* INSERT INTO `vn2008`.`empresa`(`id`, `abbreviation`, `gerente_id`, `digito_factura`, `Id_Proveedores_account`)
VALUES
(442, 'WAY', 'Wayne Industries, Inc. operates as a warehouse for steel products.', '20', '1989-11-19', NULL, NULL, '1', '1', '00FF00', 'BruceWayne@verdnatura.es', NULL, '1989-08-11 12:31:22', '110', '1', NULL, '1', '1');
(442, 'WAY', '20', '1', NULL); */
INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`)
VALUES
( 69, 'CCs', NULL, 30, NULL, 1),
(442, 'VNL', NULL, 30, 2, 2),
( 567, 'VNH', NULL, 30, NULL, 3),
( 791, 'FTH', NULL, 30, NULL, 4),
( 1381, 'ORN', NULL, 30, NULL,5);
INSERT INTO `vn`.`ticket`(`id`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `clientFk`,`nickname`, `addressFk`)
VALUES
(1, 1, 1, NULL, CURDATE(), 101, 'Batman', 101),
(2, 1, 1, NULL, CURDATE(), 101, 'Spider-Man', 102),
(3, 2, 2, NULL, CURDATE(), 102, 'Super-Man', 103),
(4, 2, 2, NULL, CURDATE(), 102, 'Iron-Man', 104),
(5, 3, 3, NULL, CURDATE(), 103, 'Magneto', 105),
(6, 3, 3, NULL, CURDATE(), 103, 'Legion', 106),
(7, 4, 4, NULL, CURDATE(), 104, 'Ant-Man', 107),
(8, 4, 4, NULL, CURDATE(), 104, 'Professor X', 108),
(9, 5, 5, NULL, CURDATE(), 105, 'Hulk', 109),
(10, 6, 5, NULL, CURDATE(), 105, 'Jessica Jones', 110);
(1, 1, 1, NULL, CURDATE(), 101, 'Batman', 101),
(2, 1, 1, NULL, CURDATE(), 101, 'Spider-Man', 102),
(3, 2, 2, NULL, CURDATE(), 102, 'Super-Man', 103),
(4, 2, 2, NULL, CURDATE(), 102, 'Iron-Man', 104),
(5, 3, 3, NULL, CURDATE(), 103, 'Magneto', 105),
(6, 3, 3, NULL, CURDATE(), 103, 'Legion', 106),
(7, 4, 4, NULL, CURDATE(), 104, 'Ant-Man', 107),
(8, 4, 4, NULL, CURDATE(), 104, 'Professor X', 108),
(9, 5, 5, NULL, CURDATE(), 105, 'Hulk', 109),
(10, 6, 5, NULL, CURDATE(), 105, 'Jessica Jones', 110);
INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`)
VALUES

View File

@ -0,0 +1,15 @@
USE `vn`;
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`company` AS
SELECT
`e`.`id` AS `id`,
`e`.`abbreviation` AS `code`,
`e`.`Id_Proveedores_account` AS `supplierAccountFk`,
`e`.`gerente_id` AS `workerManagerFk`,
`e`.`digito_factura` AS `sage200Company`,
`e`.`CodigoEmpresa` AS `companyCode`
FROM
`vn2008`.`empresa` `e`;