Tests passed
gitea/salix/dev This commit looks good Details

This commit is contained in:
Juan Ferrer 2019-10-23 18:39:44 +02:00
parent 53003246c3
commit 2a4d3ae43d
2 changed files with 9 additions and 7 deletions

View File

@ -716,6 +716,7 @@ export default {
sundayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(7)', sundayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(7)',
weekWorkedHours: 'vn-worker-time-control vn-side-menu vn-label-value > section > span', weekWorkedHours: 'vn-worker-time-control vn-side-menu vn-label-value > section > span',
nextMonthButton: 'vn-worker-time-control vn-side-menu vn-calendar vn-button[icon=keyboard_arrow_right]', nextMonthButton: 'vn-worker-time-control vn-side-menu vn-calendar vn-button[icon=keyboard_arrow_right]',
secondWeekDay: 'vn-worker-time-control vn-side-menu vn-calendar .day:nth-child(8) > .day-number',
navigateBackToIndex: 'vn-worker-descriptor vn-icon[icon="chevron_left"]' navigateBackToIndex: 'vn-worker-descriptor vn-icon[icon="chevron_left"]'
}, },
invoiceOutIndex: { invoiceOutIndex: {

View File

@ -286,11 +286,11 @@ describe('Worker time control path', () => {
}); });
}); });
describe('as salesBoss', () => { describe('as hr', () => {
describe('on Saturday', () => { describe('on Saturday', () => {
beforeAll(() => { beforeAll(() => {
nightmare nightmare
.loginAndModule('salesBoss', 'worker') .loginAndModule('hr', 'worker')
.accessToSearchResult('HankPym') .accessToSearchResult('HankPym')
.accessToSection('worker.card.timeControl'); .accessToSection('worker.card.timeControl');
}); });
@ -358,10 +358,11 @@ describe('Worker time control path', () => {
it(`should check Hank Pym doesn't have hours set on the next months first week`, async() => { it(`should check Hank Pym doesn't have hours set on the next months first week`, async() => {
const wholeWeekHours = await nightmare const wholeWeekHours = await nightmare
.waitToClick(selectors.workerTimeControl.nextMonthButton) .waitToClick(selectors.workerTimeControl.nextMonthButton)
.waitForTextInElement(selectors.workerTimeControl.weekWorkedHours, '00:00 Hours') .waitToClick(selectors.workerTimeControl.secondWeekDay)
.waitForTextInElement(selectors.workerTimeControl.weekWorkedHours, '00:00 h.')
.waitToGetProperty(selectors.workerTimeControl.weekWorkedHours, 'innerText'); .waitToGetProperty(selectors.workerTimeControl.weekWorkedHours, 'innerText');
expect(wholeWeekHours).toEqual('00:00 Hours'); expect(wholeWeekHours).toEqual('00:00 h.');
}); });
it(`should check he didn't scan in this week yet`, async() => { it(`should check he didn't scan in this week yet`, async() => {
@ -371,7 +372,7 @@ describe('Worker time control path', () => {
.accessToSection('worker.card.timeControl') .accessToSection('worker.card.timeControl')
.waitToGetProperty(selectors.workerTimeControl.weekWorkedHours, 'innerText'); .waitToGetProperty(selectors.workerTimeControl.weekWorkedHours, 'innerText');
expect(wholeWeekHours).toEqual('00:00 Hours'); expect(wholeWeekHours).toEqual('00:00 h.');
}); });
}); });
}); });
@ -386,10 +387,10 @@ describe('Worker time control path', () => {
it('should Hank Pym check his hours are alright', async() => { it('should Hank Pym check his hours are alright', async() => {
const wholeWeekHours = await nightmare const wholeWeekHours = await nightmare
.waitForTextInElement(selectors.workerTimeControl.weekWorkedHours, '56:00 Hours') .waitForTextInElement(selectors.workerTimeControl.weekWorkedHours, '56:00 h.')
.waitToGetProperty(selectors.workerTimeControl.weekWorkedHours, 'innerText'); .waitToGetProperty(selectors.workerTimeControl.weekWorkedHours, 'innerText');
expect(wholeWeekHours).toEqual('56:00 Hours'); expect(wholeWeekHours).toEqual('56:00 h.');
}); });
}); });
}); });