Merge pull request '3690-fix(worker): fix calendar e2e' (#896) from 3690-worker_calendar_fixe2e into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #896 Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
commit
2d4f182fe6
|
@ -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() => {
|
||||
it(`should log in and get to Charles Xavier'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`, () => {
|
||||
describe(`as Charles Xavier`, () => {
|
||||
it(`should log in and get to his calendar`, async() => {
|
||||
await page.loginAndModule('HankPym', 'worker');
|
||||
await page.accessToSearchResult('Hank Pym');
|
||||
await page.loginAndModule('CharlesXavier', 'worker');
|
||||
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() => {
|
||||
|
|
Loading…
Reference in New Issue