This commit is contained in:
parent
96f2e4b542
commit
9887f87dd3
|
@ -57,7 +57,8 @@ describe('Worker time control path', () => {
|
|||
expect(result).toContain(month);
|
||||
});
|
||||
|
||||
xit(`should return error when insert 'out' of first entry`, async() => {
|
||||
it(`should return error when insert 'out' of first entry`, async() => {
|
||||
pending('https://redmine.verdnatura.es/issues/4707');
|
||||
await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, eightAm);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
|
@ -67,7 +68,8 @@ describe('Worker time control path', () => {
|
|||
expect(message.text).toBeDefined();
|
||||
});
|
||||
|
||||
xit(`should insert 'in' monday`, async() => {
|
||||
it(`should insert 'in' monday`, async() => {
|
||||
pending('https://redmine.verdnatura.es/issues/4707');
|
||||
await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, eightAm);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
|
||||
|
@ -77,7 +79,8 @@ describe('Worker time control path', () => {
|
|||
expect(result).toEqual(eightAm);
|
||||
});
|
||||
|
||||
xit(`should insert 'out' monday`, async() => {
|
||||
it(`should insert 'out' monday`, async() => {
|
||||
pending('https://redmine.verdnatura.es/issues/4707');
|
||||
await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, fourPm);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
|
@ -87,12 +90,14 @@ describe('Worker time control path', () => {
|
|||
expect(result).toEqual(fourPm);
|
||||
});
|
||||
|
||||
xit(`should check Hank Pym worked 8:20 hours`, async() => {
|
||||
it(`should check Hank Pym worked 8:20 hours`, async() => {
|
||||
pending('https://redmine.verdnatura.es/issues/4707');
|
||||
await page.waitForTextInElement(selectors.workerTimeControl.mondayWorkedHours, '08:20 h.');
|
||||
await page.waitForTextInElement(selectors.workerTimeControl.weekWorkedHours, '08:20 h.');
|
||||
});
|
||||
|
||||
xit('should remove first entry of monday', async() => {
|
||||
it('should remove first entry of monday', async() => {
|
||||
pending('https://redmine.verdnatura.es/issues/4707');
|
||||
await page.waitForTextInElement(selectors.workerTimeControl.firstEntryOfMonday, eightAm);
|
||||
await page.waitForTextInElement(selectors.workerTimeControl.secondEntryOfMonday, fourPm);
|
||||
await page.waitToClick(selectors.workerTimeControl.firstEntryOfMondayDelete);
|
||||
|
@ -102,7 +107,8 @@ describe('Worker time control path', () => {
|
|||
expect(message.text).toContain('Entry removed');
|
||||
});
|
||||
|
||||
xit(`should be the 'out' the first entry of monday`, async() => {
|
||||
it(`should be the 'out' the first entry of monday`, async() => {
|
||||
pending('https://redmine.verdnatura.es/issues/4707');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfMonday, 'innerText');
|
||||
|
||||
expect(result).toEqual(fourPm);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
xdescribe('workerTimeControl sendMail()', () => {
|
||||
describe('workerTimeControl sendMail()', () => {
|
||||
const workerId = 18;
|
||||
const activeCtx = {
|
||||
getLocale: () => {
|
||||
|
@ -10,6 +10,7 @@ xdescribe('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 @@ xdescribe('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 @@ xdescribe('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 @@ xdescribe('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 {
|
||||
|
|
|
@ -200,7 +200,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
});
|
||||
|
||||
describe('WorkerTimeControl_clockIn calls', () => {
|
||||
xit('should fail to add a time entry if the target user has an absence that day', async() => {
|
||||
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();
|
||||
|
@ -246,7 +247,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
});
|
||||
|
||||
describe('direction errors', () => {
|
||||
xit('should throw an error when trying "in" direction twice', async() => {
|
||||
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;
|
||||
|
||||
|
@ -275,7 +277,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
expect(error.message).toBe(`Dirección incorrecta`);
|
||||
});
|
||||
|
||||
xit('should throw an error when trying "in" direction after insert "in" and "middle"', async() => {
|
||||
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;
|
||||
|
||||
|
@ -308,7 +311,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
expect(error.message).toBe(`Dirección incorrecta`);
|
||||
});
|
||||
|
||||
xit('Should throw an error when trying "out" before closing a "middle" couple', async() => {
|
||||
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;
|
||||
|
||||
|
@ -341,7 +345,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
expect(error.message).toBe(`Dirección incorrecta`);
|
||||
});
|
||||
|
||||
xit('should throw an error when trying "middle" after "out"', async() => {
|
||||
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;
|
||||
|
||||
|
@ -374,7 +379,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
expect(error.message).toBe(`Dirección incorrecta`);
|
||||
});
|
||||
|
||||
xit('should throw an error when trying "out" direction twice', async() => {
|
||||
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;
|
||||
|
||||
|
@ -445,7 +451,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
expect(error.message).toBe(`Descanso diario 12h.`);
|
||||
});
|
||||
|
||||
xit('should not fail as the 12h rest is fulfilled', async() => {
|
||||
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;
|
||||
|
||||
|
@ -481,7 +488,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
});
|
||||
|
||||
describe('for 3500kg drivers with enforced 9h rest', () => {
|
||||
xit('should throw an error when the 9h enforced rest is not fulfilled', async() => {
|
||||
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;
|
||||
|
||||
|
@ -515,7 +523,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
expect(error.message).toBe(`Descanso diario 9h.`);
|
||||
});
|
||||
|
||||
xit('should not fail when the 9h enforced rest is fulfilled', async() => {
|
||||
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;
|
||||
|
||||
|
@ -551,7 +560,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
});
|
||||
|
||||
describe('for 36h weekly rest', () => {
|
||||
xit('should throw an error when the 36h weekly rest is not fulfilled', async() => {
|
||||
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;
|
||||
|
||||
|
@ -585,7 +595,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
expect(error.message).toBe(`Descanso semanal 36h. / 72h.`);
|
||||
});
|
||||
|
||||
xit('should throw an error when the 36h weekly rest is not fulfilled again', async() => {
|
||||
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;
|
||||
|
||||
|
@ -618,7 +629,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
});
|
||||
|
||||
describe('for 72h weekly rest', () => {
|
||||
xit('should throw when the 72h weekly rest is not fulfilled yet', async() => {
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue