#1824 e2e worker.basicData
This commit is contained in:
parent
a3a7b4cbaa
commit
03a19c8553
|
@ -659,6 +659,12 @@ export default {
|
||||||
firstTicketDeleteButton: 'vn-route-tickets vn-tr:nth-child(1) vn-icon[icon="delete"]',
|
firstTicketDeleteButton: 'vn-route-tickets vn-tr:nth-child(1) vn-icon[icon="delete"]',
|
||||||
confirmButton: '.vn-confirm.shown button[response="accept"]'
|
confirmButton: '.vn-confirm.shown button[response="accept"]'
|
||||||
},
|
},
|
||||||
|
workerBasicData: {
|
||||||
|
name: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.firstName"]',
|
||||||
|
surname: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.lastName"]',
|
||||||
|
phone: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.phone"]',
|
||||||
|
saveButton: 'vn-worker-basic-data button[type=submit]'
|
||||||
|
},
|
||||||
workerPbx: {
|
workerPbx: {
|
||||||
extension: 'vn-worker-pbx vn-textfield[ng-model="$ctrl.worker.sip.extension"]',
|
extension: 'vn-worker-pbx vn-textfield[ng-model="$ctrl.worker.sip.extension"]',
|
||||||
saveButton: 'vn-worker-pbx button[type=submit]'
|
saveButton: 'vn-worker-pbx button[type=submit]'
|
||||||
|
|
|
@ -60,7 +60,7 @@ describe('Client Edit billing data path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should save the form with all its new data`, async() => {
|
it(`should save the form with all its new data`, async() => {
|
||||||
// await page.waitFor(3000);
|
await page.waitFor(2000);
|
||||||
await page.waitForWatcherData(selectors.clientBillingData.watcher);
|
await page.waitForWatcherData(selectors.clientBillingData.watcher);
|
||||||
await page.waitToClick(selectors.clientBillingData.saveButton);
|
await page.waitToClick(selectors.clientBillingData.saveButton);
|
||||||
let snackbarMessage = await page.waitForLastSnackbar();
|
let snackbarMessage = await page.waitForLastSnackbar();
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Worker basic data path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('hr', 'worker');
|
||||||
|
await page.accessToSearchResult('David Charles Haller');
|
||||||
|
await page.accessToSection('worker.card.basicData');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should edit the form', async() => {
|
||||||
|
await page.clearInput(selectors.workerBasicData.name);
|
||||||
|
await page.write(selectors.workerBasicData.name, 'David C.');
|
||||||
|
await page.clearInput(selectors.workerBasicData.surname);
|
||||||
|
await page.write(selectors.workerBasicData.surname, 'H.');
|
||||||
|
await page.clearInput(selectors.workerBasicData.phone);
|
||||||
|
await page.write(selectors.workerBasicData.phone, '444332211');
|
||||||
|
await page.waitToClick(selectors.workerBasicData.saveButton);
|
||||||
|
const result = await page.waitForLastSnackbar();
|
||||||
|
|
||||||
|
expect(result).toEqual('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should reload the section then check the name was edited', async() => {
|
||||||
|
await page.reloadSection('worker.card.basicData');
|
||||||
|
const result = await page.waitToGetProperty(selectors.workerBasicData.name, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('David C.');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should the surname was edited', async() => {
|
||||||
|
const result = await page.waitToGetProperty(selectors.workerBasicData.surname, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('H.');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should the phone was edited', async() => {
|
||||||
|
const result = await page.waitToGetProperty(selectors.workerBasicData.phone, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('444332211');
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,8 +1,7 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
import selectors from '../../helpers/selectors.js';
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
// #2047 WorkerTimeControl no suma horas
|
describe('Worker time control path', () => {
|
||||||
xdescribe('Worker time control path', () => {
|
|
||||||
let browser;
|
let browser;
|
||||||
let page;
|
let page;
|
||||||
beforeAll(async() => {
|
beforeAll(async() => {
|
||||||
|
|
Loading…
Reference in New Issue