Merge branch 'dev' into 3571-refactor-e2e
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-01-03 11:40:02 +00:00
commit 8397345cef
4 changed files with 22 additions and 2 deletions

View File

@ -29,8 +29,12 @@ module.exports = Self => {
filter = mergeFilters(filter, {where});
const stmt = new ParameterizedSQL(
`SELECT * FROM campaign`);
`SELECT * FROM (`);
stmt.merge('SELECT * FROM campaign');
stmt.merge(conn.makeWhere(filter.where));
stmt.merge('ORDER BY dated ASC');
stmt.merge('LIMIT 10000000000000000000');
stmt.merge(') sub');
stmt.merge('GROUP BY code');
stmt.merge(conn.makePagination(filter));

View File

@ -2652,7 +2652,7 @@ INSERT INTO `vn`.`mdbVersion` (`app`, `branchFk`, `version`)
INSERT INTO `vn`.`accountingConfig` (`id`, `minDate`, `maxDate`)
VALUES
(1, '2022-01-01', '2023-01-01');
(1, CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)), '-01-01'), CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL +1 YEAR)), '-01-01'));
INSERT INTO `vn`.`saleGroup` (`userFk`, `parkingFk`, `sectorFk`)

View File

@ -10,6 +10,7 @@ describe('workerTimeControl sendMail()', () => {
const ctx = {req: activeCtx, args: {}};
it('should fill time control of a worker without records in Journey and with rest', async() => {
pending('https://redmine.verdnatura.es/issues/4903');
const tx = await models.WorkerTimeControl.beginTransaction({});
try {
@ -34,6 +35,7 @@ describe('workerTimeControl sendMail()', () => {
});
it('should fill time control of a worker without records in Journey and without rest', async() => {
pending('https://redmine.verdnatura.es/issues/4903');
const workdayOf20Hours = 3;
const tx = await models.WorkerTimeControl.beginTransaction({});
@ -61,6 +63,7 @@ describe('workerTimeControl sendMail()', () => {
});
it('should fill time control of a worker with records in Journey and with rest', async() => {
pending('https://redmine.verdnatura.es/issues/4903');
const tx = await models.WorkerTimeControl.beginTransaction({});
try {
@ -92,6 +95,7 @@ describe('workerTimeControl sendMail()', () => {
});
it('should fill time control of a worker with records in Journey and without rest', async() => {
pending('https://redmine.verdnatura.es/issues/4903');
const tx = await models.WorkerTimeControl.beginTransaction({});
try {

View File

@ -201,6 +201,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
describe('WorkerTimeControl_clockIn calls', () => {
it('should fail to add a time entry if the target user has an absence that day', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
const date = new Date();
@ -247,6 +248,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
describe('direction errors', () => {
it('should throw an error when trying "in" direction twice', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
@ -276,6 +278,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
});
it('should throw an error when trying "in" direction after insert "in" and "middle"', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
@ -309,6 +312,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
});
it('Should throw an error when trying "out" before closing a "middle" couple', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
@ -342,6 +346,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
});
it('should throw an error when trying "middle" after "out"', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
@ -375,6 +380,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
});
it('should throw an error when trying "out" direction twice', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
@ -446,6 +452,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
});
it('should not fail as the 12h rest is fulfilled', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
@ -482,6 +489,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
describe('for 3500kg drivers with enforced 9h rest', () => {
it('should throw an error when the 9h enforced rest is not fulfilled', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = jessicaJonesId;
@ -516,6 +524,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
});
it('should not fail when the 9h enforced rest is fulfilled', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = jessicaJonesId;
@ -552,6 +561,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
describe('for 36h weekly rest', () => {
it('should throw an error when the 36h weekly rest is not fulfilled', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
@ -586,6 +596,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
});
it('should throw an error when the 36h weekly rest is not fulfilled again', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;
@ -619,6 +630,7 @@ describe('workerTimeControl add/delete timeEntry()', () => {
describe('for 72h weekly rest', () => {
it('should throw when the 72h weekly rest is not fulfilled yet', async() => {
pending('https://redmine.verdnatura.es/issues/4707');
activeCtx.accessToken.userId = salesBossId;
const workerId = hankPymId;