2018-03-22 14:01:36 +00:00
|
|
|
import selectors from '../../helpers/selectors.js';
|
2018-10-24 08:57:14 +00:00
|
|
|
import createNightmare from '../../helpers/nightmare';
|
2018-03-22 14:01:36 +00:00
|
|
|
|
2019-01-11 17:00:29 +00:00
|
|
|
// #776
|
|
|
|
xdescribe('Ticket expeditions and log path', () => {
|
2018-12-19 07:42:07 +00:00
|
|
|
const nightmare = createNightmare();
|
2018-03-22 14:01:36 +00:00
|
|
|
|
2018-12-19 07:42:07 +00:00
|
|
|
beforeAll(() => {
|
|
|
|
return nightmare
|
2019-01-11 11:41:07 +00:00
|
|
|
.loginAndModule('developer', 'ticket')
|
2018-12-19 07:42:07 +00:00
|
|
|
.accessToSearchResult('id:1')
|
|
|
|
.accessToSection('ticket.card.expedition');
|
|
|
|
});
|
2018-03-22 14:01:36 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should delete a former expedition and confirm the remaining expedition are the expected ones`, async() => {
|
2018-12-19 07:42:07 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
|
|
|
|
.waitToClick(selectors.ticketExpedition.acceptDeleteRowButton)
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.ticketPackages.packagesButton)
|
2019-01-07 08:33:07 +00:00
|
|
|
.wait(selectors.ticketPackages.firstPackageAutocomplete)
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.ticketExpedition.expeditionButton)
|
2018-12-19 07:42:07 +00:00
|
|
|
.wait(selectors.ticketExpedition.expeditionRow)
|
|
|
|
.countElement(selectors.ticketExpedition.expeditionRow);
|
2018-10-29 08:21:33 +00:00
|
|
|
|
2018-12-19 07:42:07 +00:00
|
|
|
expect(result).toEqual(3);
|
2018-03-22 14:01:36 +00:00
|
|
|
});
|
2019-01-11 11:41:07 +00:00
|
|
|
|
|
|
|
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');
|
|
|
|
});
|
2018-03-22 14:01:36 +00:00
|
|
|
});
|