42 lines
1.7 KiB
JavaScript
42 lines
1.7 KiB
JavaScript
import selectors from '../../helpers/selectors.js';
|
|
import createNightmare from '../../helpers/nightmare';
|
|
|
|
// #776
|
|
xdescribe('Ticket expeditions and log path', () => {
|
|
const nightmare = createNightmare();
|
|
|
|
beforeAll(() => {
|
|
return nightmare
|
|
.loginAndModule('developer', '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);
|
|
});
|
|
|
|
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');
|
|
});
|
|
});
|