import selectors from '../../../helpers/selectors.js'; import getBrowser from '../../../helpers/puppeteer'; describe('department summary path', () => { let browser; let page; beforeAll(async() => { browser = await getBrowser(); page = browser.page; await page.loginAndModule('hr', 'worker'); await page.accessToSection('worker.department'); await page.doSearch('INFORMATICA'); await page.click(selectors.department.firstDepartment); }); afterAll(async() => { await browser.close(); }); it('should reach the employee summary section and check all properties', async() => { expect(await page.waitToGetProperty(selectors.departmentSummary.header, 'innerText')).toEqual('INFORMATICA'); expect(await page.getProperty(selectors.departmentSummary.name, 'innerText')).toEqual('INFORMATICA'); expect(await page.getProperty(selectors.departmentSummary.code, 'innerText')).toEqual('IT'); expect(await page.getProperty(selectors.departmentSummary.chat, 'innerText')).toEqual('informatica-cau'); expect(await page.getProperty(selectors.departmentSummary.bossDepartment, 'innerText')).toEqual(''); expect(await page.getProperty(selectors.departmentSummary.email, 'innerText')).toEqual('-'); expect(await page.getProperty(selectors.departmentSummary.clientFk, 'innerText')).toEqual('-'); }); });