salix/e2e/paths/ticket-module/02_delete_ticket_expedition...

27 lines
1.1 KiB
JavaScript

import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Ticket Delete expeditions path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.loginAndModule('production', 'ticket')
.accessToSearchResult('id:1')
.accessToSection('ticket.card.expedition');
});
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.firstPackageAutocomplete)
.click(selectors.ticketExpedition.expeditionButton)
.wait(selectors.ticketExpedition.expeditionRow)
.countElement(selectors.ticketExpedition.expeditionRow);
expect(result).toEqual(3);
});
});