#776 e2e de ticket.log

This commit is contained in:
Carlos Jimenez 2019-01-11 12:41:07 +01:00
parent ce0d80f019
commit 9dcad609d4
4 changed files with 32 additions and 12 deletions

View File

@ -413,6 +413,12 @@ export default {
firstDescription: 'vn-ticket-request-index > form > vn-card > div > vn-horizontal > vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(2)',
},
ticketLog: {
logButton: `vn-left-menu a[ui-sref="ticket.card.log"]`,
changedBy: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > div > div:nth-child(1) > span.value.ng-scope.ng-binding',
actionTaken: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > div > div:nth-child(3) > span.value.ng-scope.ng-binding',
id: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr > vn-td.before > vn-one:nth-child(1) > div > span.value.ng-scope.ng-binding'
},
createStateView: {
stateAutocomplete: `vn-autocomplete[field="$ctrl.ticket.stateFk"]`,
clearStateInputButton: `vn-autocomplete[field="$ctrl.ticket.stateFk"] > div > div > div > vn-icon > i`,

View File

@ -1,12 +1,12 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Ticket Delete expeditions path', () => {
fdescribe('Ticket Delete expeditions path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.loginAndModule('production', 'ticket')
.loginAndModule('developer', 'ticket')
.accessToSearchResult('id:1')
.accessToSection('ticket.card.expedition');
});
@ -23,4 +23,18 @@ describe('Ticket Delete expeditions path', () => {
expect(result).toEqual(3);
});
it(`should confirm the expedition deleted is shown now in the ticket log`, async() => {
const changedBy = await nightmare
.waitToClick(selectors.ticketLog.logButton)
.waitToGetProperty(selectors.ticketLog.changedBy, 'innerText');
const actionTaken = await nightmare
.waitToGetProperty(selectors.ticketLog.actionTaken, 'innerText');
const id = await nightmare
.waitToGetProperty(selectors.ticketLog.id, 'innerText');
expect(changedBy).toEqual('production');
expect(actionTaken).toEqual('Deletes');
expect(id).toEqual('3');
});
});