diff --git a/e2e/paths/03-worker/05_calendar.spec.js b/e2e/paths/03-worker/05_calendar.spec.js index 08ef71f13..6d3d7bd4d 100644 --- a/e2e/paths/03-worker/05_calendar.spec.js +++ b/e2e/paths/03-worker/05_calendar.spec.js @@ -9,7 +9,7 @@ describe('Worker calendar path', () => { browser = await getBrowser(); page = browser.page; await page.loginAndModule('hr', 'worker'); - await page.accessToSearchResult('Hank Pym'); + await page.accessToSearchResult('Charles Xavier'); await page.accessToSection('worker.card.calendar'); }); @@ -18,12 +18,6 @@ describe('Worker calendar path', () => { }); describe('as hr', () => { - it('should check 5 total holidays have been used so far before testing anything', async() => { - const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText'); - - expect(result).toContain(' 5 '); - }); - it('should set two days as holidays on the calendar and check the total holidays increased by 1.5', async() => { await page.waitToClick(selectors.workerCalendar.holidays); await page.waitForTimeout(reasonableTimeBetweenClicks); @@ -56,14 +50,14 @@ describe('Worker calendar path', () => { const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText'); - expect(result).toContain(' 6.5 '); + expect(result).toContain(' 1.5 '); }); }); describe(`as salesBoss`, () => { it(`should log in and get to Hank's calendar`, async() => { await page.loginAndModule('salesBoss', 'worker'); - await page.accessToSearchResult('Hank Pym'); + await page.accessToSearchResult('Charles Xavier'); await page.accessToSection('worker.card.calendar'); }); @@ -101,14 +95,14 @@ describe('Worker calendar path', () => { it('should check the total holidays used are back to what it was', async() => { const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText'); - expect(result).toContain(' 5 '); + expect(result).toContain(' 0 '); }); }); describe(`as Hank`, () => { it(`should log in and get to his calendar`, async() => { await page.loginAndModule('HankPym', 'worker'); - await page.accessToSearchResult('Hank Pym'); + await page.accessToSearchResult('Charles Xavier'); await page.accessToSection('worker.card.calendar'); }); @@ -122,7 +116,7 @@ describe('Worker calendar path', () => { it('should check the total holidays used are now the initial ones', async() => { const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText'); - expect(result).toContain(' 5 '); + expect(result).toContain(' 0 '); }); it('should use the year selector to go to the previous year', async() => {