Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2005_e2e_orden_summary
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
b0c5206abb
|
@ -711,6 +711,17 @@ export default {
|
|||
firstTicketDeleteButton: 'vn-route-tickets vn-tr:nth-child(1) vn-icon[icon="delete"]',
|
||||
confirmButton: '.vn-confirm.shown button[response="accept"]'
|
||||
},
|
||||
workerSummary: {
|
||||
header: 'vn-worker-summary h5',
|
||||
id: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(2) > section > span',
|
||||
email: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(3) > section > span',
|
||||
department: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(4) > section > span',
|
||||
userId: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(2) > section > span',
|
||||
userName: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(3) > section > span',
|
||||
role: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(4) > section > span',
|
||||
extension: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(5) > section > span',
|
||||
|
||||
},
|
||||
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"]',
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Worker summary path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('employee', 'worker');
|
||||
await page.accessToSearchResult('agencyNick');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should reach the employee summary section', async() => {
|
||||
const url = await page.expectURL('#!/worker/3/summary');
|
||||
|
||||
expect(url).toBe(true);
|
||||
});
|
||||
|
||||
it('should check the summary contains the name and userName on the header', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.header, 'innerText');
|
||||
|
||||
expect(result).toEqual('agency agency');
|
||||
});
|
||||
|
||||
it('should check the summary contains the basic data id', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.id, 'innerText');
|
||||
|
||||
expect(result).toEqual('3');
|
||||
});
|
||||
|
||||
it('should check the summary contains the basic data email', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.email, 'innerText');
|
||||
|
||||
expect(result).toEqual('agency@verdnatura.es');
|
||||
});
|
||||
|
||||
it('should check the summary contains the basic data department', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.department, 'innerText');
|
||||
|
||||
expect(result).toEqual('CAMARA');
|
||||
});
|
||||
|
||||
it('should check the summary contains the user data id', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.userId, 'innerText');
|
||||
|
||||
expect(result).toEqual('3');
|
||||
});
|
||||
|
||||
it('should check the summary contains the user data name', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.userName, 'innerText');
|
||||
|
||||
expect(result).toEqual('agency');
|
||||
});
|
||||
|
||||
it('should check the summary contains the user data role', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.role, 'innerText');
|
||||
|
||||
expect(result).toEqual('agency');
|
||||
});
|
||||
|
||||
it('should check the summary contains the user data extension', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.extension, 'innerText');
|
||||
|
||||
expect(result).toEqual('1101');
|
||||
});
|
||||
});
|
|
@ -42,6 +42,7 @@ describe('Travel basic data path', () => {
|
|||
it('should now edit the whole form then save', async() => {
|
||||
await page.clearInput(selectors.travelBasicDada.reference);
|
||||
await page.write(selectors.travelBasicDada.reference, 'new reference!');
|
||||
await page.waitForContentLoaded(); // this test fails some times to autocomplete the agency underneath
|
||||
await page.autocompleteSearch(selectors.travelBasicDada.agency, 'Entanglement');
|
||||
await page.autocompleteSearch(selectors.travelBasicDada.outputWarehouse, 'Warehouse Three');
|
||||
await page.autocompleteSearch(selectors.travelBasicDada.inputWarehouse, 'Warehouse Four');
|
||||
|
|
Loading…
Reference in New Issue