2023-06-02 12:44:56 +00:00
|
|
|
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;
|
2023-06-30 11:52:46 +00:00
|
|
|
await page.loginAndModule('hr', 'worker');
|
2023-06-02 12:44:56 +00:00
|
|
|
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('-');
|
|
|
|
});
|
|
|
|
});
|