7525-devToTest #2542
|
@ -1259,7 +1259,8 @@ INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`, `created`, `trainFk`)
|
||||||
(1, 1106, 5, DATE_ADD(util.VN_CURDATE(),INTERVAL +1 DAY), 1),
|
(1, 1106, 5, DATE_ADD(util.VN_CURDATE(),INTERVAL +1 DAY), 1),
|
||||||
(2, 1106, 14, util.VN_CURDATE(), 1),
|
(2, 1106, 14, util.VN_CURDATE(), 1),
|
||||||
(4, 49, 5, util.VN_CURDATE(), 1),
|
(4, 49, 5, util.VN_CURDATE(), 1),
|
||||||
(5, 18, 5, util.VN_CURDATE(), 1);
|
(5, 18, 5, util.VN_CURDATE(), 1),
|
||||||
|
(6, 18, 5, util.VN_CURDATE(), 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketCollection`(`ticketFk`, `collectionFk`, `level`)
|
INSERT INTO `vn`.`ticketCollection`(`ticketFk`, `collectionFk`, `level`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1268,7 +1269,8 @@ INSERT INTO `vn`.`ticketCollection`(`ticketFk`, `collectionFk`, `level`)
|
||||||
(3, 2, NULL),
|
(3, 2, NULL),
|
||||||
(23, 1, NULL),
|
(23, 1, NULL),
|
||||||
(34, 4, 1),
|
(34, 4, 1),
|
||||||
(35, 5, 1);
|
(35, 5, 1),
|
||||||
|
(8, 6, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`genus`(`id`, `name`)
|
INSERT INTO `vn`.`genus`(`id`, `name`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use account;
|
use account;
|
||||||
|
|
||||||
INSERT INTO account.role
|
INSERT INTO role
|
||||||
SET name = 'reviewer',
|
SET name = 'reviewer',
|
||||||
description = 'Revisor de producción',
|
description = 'Revisor de producción',
|
||||||
hasLogin = TRUE,
|
hasLogin = TRUE,
|
||||||
|
@ -8,29 +8,29 @@ INSERT INTO account.role
|
||||||
modified = util.VN_CURDATE(),
|
modified = util.VN_CURDATE(),
|
||||||
editorFk = NULL;
|
editorFk = NULL;
|
||||||
|
|
||||||
INSERT IGNORE INTO account.roleInherit(
|
INSERT INTO roleInherit(
|
||||||
role,
|
role,
|
||||||
inheritsFrom
|
inheritsFrom
|
||||||
)
|
)
|
||||||
SELECT r1.id,
|
SELECT r1.id,
|
||||||
r2.id
|
r2.id
|
||||||
FROM account.role r1
|
FROM role r1
|
||||||
JOIN account.role r2
|
JOIN role r2
|
||||||
WHERE r2.name = 'production'
|
WHERE r1.name = 'reviewer'
|
||||||
AND r1.name = 'reviewer'
|
AND r2.name = 'production'
|
||||||
UNION
|
UNION
|
||||||
SELECT ri.role,
|
SELECT ri.role,
|
||||||
r2.id
|
r2.id
|
||||||
FROM account.roleInherit ri
|
FROM roleInherit ri
|
||||||
JOIN account.role r1 ON r1.id = ri.role
|
JOIN role r1 ON r1.id = ri.role
|
||||||
JOIN account.role r2 ON r2.name = 'reviewer'
|
JOIN role r2 ON r2.name = 'reviewer'
|
||||||
WHERE r1.name IN ('claimManager', 'productionBoss')
|
WHERE r1.name IN ('claimManager', 'productionBoss')
|
||||||
GROUP BY ri.role;
|
GROUP BY ri.role;
|
||||||
|
|
||||||
DELETE ri
|
DELETE ri
|
||||||
FROM account.roleInherit ri
|
FROM roleInherit ri
|
||||||
JOIN account.role r1 ON ri.role = r1.id
|
JOIN role r1 ON ri.role = r1.id
|
||||||
JOIN account.role r2 ON ri.inheritsFrom = r2.id
|
JOIN role r2 ON ri.inheritsFrom = r2.id
|
||||||
WHERE r1.name = 'replenisher'
|
WHERE r1.name = 'replenisher'
|
||||||
AND r2.name = 'buyer';
|
AND r2.name = 'buyer';
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ UPDATE salix.ACL
|
||||||
SET principalId = 'reviewer'
|
SET principalId = 'reviewer'
|
||||||
WHERE property = 'isInPreparing';
|
WHERE property = 'isInPreparing';
|
||||||
|
|
||||||
UPDATE account.user u
|
UPDATE user u
|
||||||
JOIN vn.workerDepartment wd ON wd.workerFk = u.id
|
JOIN vn.workerDepartment wd ON wd.workerFk = u.id
|
||||||
JOIN vn.department d ON wd.departmentFk = d.id
|
JOIN vn.department d ON wd.departmentFk = d.id
|
||||||
JOIN account.role r ON r.name = 'reviewer'
|
JOIN role r ON r.name = 'reviewer'
|
||||||
SET u.role = r.id
|
SET u.role = r.id
|
||||||
WHERE d.name IN ('REVISION', 'PREVIA');
|
WHERE d.name IN ('REVISION', 'PREVIA');
|
|
@ -225,7 +225,7 @@ describe('Ticket Edit sale path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show error trying to delete a ticket with a refund', async() => {
|
it('should show error trying to delete a ticket with a refund', async() => {
|
||||||
await page.loginAndModule('production', 'ticket');
|
await page.loginAndModule('salesPerson', 'ticket');
|
||||||
await page.accessToSearchResult('8');
|
await page.accessToSearchResult('8');
|
||||||
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
|
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
|
||||||
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteTicket);
|
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteTicket);
|
||||||
|
|
23
e2e/tests.js
23
e2e/tests.js
|
@ -5,7 +5,6 @@ require('regenerator-runtime/runtime');
|
||||||
require('vn-loopback/server/boot/date')();
|
require('vn-loopback/server/boot/date')();
|
||||||
const getopts = require('getopts');
|
const getopts = require('getopts');
|
||||||
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const Myt = require('@verdnatura/myt/myt');
|
const Myt = require('@verdnatura/myt/myt');
|
||||||
const Run = require('@verdnatura/myt/myt-run');
|
const Run = require('@verdnatura/myt/myt-run');
|
||||||
|
@ -36,12 +35,22 @@ async function test() {
|
||||||
const Jasmine = require('jasmine');
|
const Jasmine = require('jasmine');
|
||||||
const jasmine = new Jasmine();
|
const jasmine = new Jasmine();
|
||||||
|
|
||||||
const e2ePath = './e2e/paths';
|
const specFiles = [
|
||||||
const file = '*[sS]pec.js';
|
`./e2e/paths/01*/*[sS]pec.js`,
|
||||||
const specFiles = fs.readdirSync(e2ePath)
|
`./e2e/paths/02*/*[sS]pec.js`,
|
||||||
.sort()
|
`./e2e/paths/03*/*[sS]pec.js`,
|
||||||
.map(folder => `${e2ePath}/${folder}/${file}`)
|
`./e2e/paths/04*/*[sS]pec.js`,
|
||||||
.concat(`${e2ePath}/**/${file}`);
|
`./e2e/paths/05*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/06*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/07*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/08*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/09*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/10*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/11*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/12*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/13*/*[sS]pec.js`,
|
||||||
|
`./e2e/paths/**/*[sS]pec.js`
|
||||||
|
];
|
||||||
|
|
||||||
jasmine.loadConfig({
|
jasmine.loadConfig({
|
||||||
spec_dir: '.',
|
spec_dir: '.',
|
||||||
|
|
Loading…
Reference in New Issue