regenerate invoice added to descriptor path
This commit is contained in:
parent
d26505d25e
commit
fb798f4300
|
@ -432,6 +432,7 @@ export default {
|
|||
moreMenuDeleteTicket: '.vn-menu [name="deleteTicket"]',
|
||||
moreMenuRestoreTicket: '.vn-menu [name="restoreTicket"]',
|
||||
moreMenuMakeInvoice: '.vn-menu [name="makeInvoice"]',
|
||||
moreMenuRegenerateInvoice: '.vn-menu [name="regenerateInvoice"]',
|
||||
moreMenuChangeShippedHour: '.vn-menu [name="changeShipped"]',
|
||||
moreMenuPaymentSMS: '.vn-menu [name="sendPaymentSms"]',
|
||||
moreMenuSendImportSms: '.vn-menu [name="sendImportSms"]',
|
||||
|
|
|
@ -129,10 +129,10 @@ describe('Ticket descriptor path', () => {
|
|||
});
|
||||
|
||||
describe('Make invoice', () => {
|
||||
it('should login as adminBoss role then search for a ticket', async() => {
|
||||
it('should login as administrative role then search for a ticket', async() => {
|
||||
const invoiceableTicketId = '14';
|
||||
|
||||
await page.loginAndModule('adminBoss', 'ticket');
|
||||
await page.loginAndModule('administrative', 'ticket');
|
||||
await page.accessToSearchResult(invoiceableTicketId);
|
||||
await page.waitForState('ticket.card.summary');
|
||||
});
|
||||
|
@ -160,6 +160,18 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
expect(result).toEqual('T4444445');
|
||||
});
|
||||
|
||||
it(`should regenerate the invoice using the descriptor menu`, async() => {
|
||||
const expectedMessage = 'Invoice sent for a regeneration, will be available in a few minutes';
|
||||
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
|
||||
await page.waitForContentLoaded();
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenuRegenerateInvoice);
|
||||
await page.respondToDialog('accept');
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain(expectedMessage);
|
||||
});
|
||||
});
|
||||
|
||||
describe('SMS', () => {
|
||||
|
|
|
@ -84,6 +84,7 @@
|
|||
ng-show="$ctrl.isInvoiced"
|
||||
vn-acl="invoicing"
|
||||
vn-acl-action="remove"
|
||||
name="regenerateInvoice"
|
||||
translate>
|
||||
Regenerate invoice
|
||||
</vn-item>
|
||||
|
|
Loading…
Reference in New Issue