minor refactor
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
caf5ad7a63
commit
3cfca5690f
|
@ -2,6 +2,7 @@ import selectors from '../../helpers/selectors.js';
|
|||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Worker calendar path', () => {
|
||||
let reasonableTimeBetweenClicks = 400;
|
||||
let browser;
|
||||
let page;
|
||||
beforeAll(async() => {
|
||||
|
@ -25,29 +26,29 @@ describe('Worker calendar path', () => {
|
|||
|
||||
it('should set two days as holidays on the calendar', async() => {
|
||||
await page.waitToClick(selectors.workerCalendar.holidays);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.januaryThirtyFirst);
|
||||
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.absence);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.marchTwentyThird);
|
||||
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.halfHoliday);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.mayFourth);
|
||||
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.furlough);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.mayTwelfth);
|
||||
await page.waitToClick(selectors.workerCalendar.mayThirteenth);
|
||||
await page.waitToClick(selectors.workerCalendar.mayFourteenth);
|
||||
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.halfFurlough);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.mayEighth);
|
||||
});
|
||||
|
||||
|
@ -66,31 +67,31 @@ describe('Worker calendar path', () => {
|
|||
});
|
||||
|
||||
it('should undo what was done here', async() => {
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.holidays);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.januaryThirtyFirst);
|
||||
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.absence);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.marchTwentyThird);
|
||||
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.halfHoliday);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.mayFourth);
|
||||
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.furlough);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.mayTwelfth);
|
||||
await page.waitToClick(selectors.workerCalendar.mayThirteenth);
|
||||
await page.waitToClick(selectors.workerCalendar.mayFourteenth);
|
||||
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.halfFurlough);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.mayEighth);
|
||||
});
|
||||
|
||||
|
@ -109,9 +110,9 @@ describe('Worker calendar path', () => {
|
|||
});
|
||||
|
||||
it('should make a futile attempt to add holidays', async() => {
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.holidays);
|
||||
await page.waitFor(400);
|
||||
await page.waitFor(reasonableTimeBetweenClicks);
|
||||
await page.waitToClick(selectors.workerCalendar.januaryThirtyFirst);
|
||||
});
|
||||
|
||||
|
@ -128,7 +129,7 @@ describe('Worker calendar path', () => {
|
|||
|
||||
// await page.autocompleteSearch(selectors.workerCalendar.year, lastYear);
|
||||
|
||||
// await page.waitFor(400);
|
||||
// await page.waitFor(reasonableTimeBetweenClicks);
|
||||
// const result = await page.waitToGetProperty(selectors.workerCalendar.totalHolidaysUsed, 'innerText');
|
||||
|
||||
// expect(result).toContain(' 0 ');
|
||||
|
|
Loading…
Reference in New Issue