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
|
|
|
|
2018-12-19 07:42:07 +00:00
|
|
|
describe('Ticket Delete expeditions path', () => {
|
|
|
|
const nightmare = createNightmare();
|
2018-03-22 14:01:36 +00:00
|
|
|
|
2018-12-19 07:42:07 +00:00
|
|
|
beforeAll(() => {
|
|
|
|
return nightmare
|
|
|
|
.loginAndModule('production', 'ticket')
|
|
|
|
.accessToSearchResult('id:1')
|
|
|
|
.accessToSection('ticket.card.expedition');
|
|
|
|
});
|
2018-03-22 14:01:36 +00:00
|
|
|
|
2018-12-19 07:42:07 +00:00
|
|
|
it(`should delete a former expedition and confirm the remaining expedition are the expected ones`, async () => {
|
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
|
|
|
|
.waitToClick(selectors.ticketExpedition.acceptDeleteRowButton)
|
|
|
|
.click(selectors.ticketPackages.packagesButton)
|
|
|
|
.wait(selectors.ticketPackages.firstPackageSelect)
|
|
|
|
.click(selectors.ticketExpedition.expeditionButton)
|
|
|
|
.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
|
|
|
});
|
|
|
|
});
|