Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2517-clientBalanceCompensaciones

This commit is contained in:
Carlos Jimenez Ruiz 2021-01-25 10:56:50 +01:00
commit de94d62f2e
3 changed files with 16 additions and 2 deletions

View File

@ -433,6 +433,7 @@ export default {
moreMenuDeleteTicket: '.vn-menu [name="deleteTicket"]', moreMenuDeleteTicket: '.vn-menu [name="deleteTicket"]',
moreMenuRestoreTicket: '.vn-menu [name="restoreTicket"]', moreMenuRestoreTicket: '.vn-menu [name="restoreTicket"]',
moreMenuMakeInvoice: '.vn-menu [name="makeInvoice"]', moreMenuMakeInvoice: '.vn-menu [name="makeInvoice"]',
moreMenuRegenerateInvoice: '.vn-menu [name="regenerateInvoice"]',
moreMenuChangeShippedHour: '.vn-menu [name="changeShipped"]', moreMenuChangeShippedHour: '.vn-menu [name="changeShipped"]',
moreMenuPaymentSMS: '.vn-menu [name="sendPaymentSms"]', moreMenuPaymentSMS: '.vn-menu [name="sendPaymentSms"]',
moreMenuSendImportSms: '.vn-menu [name="sendImportSms"]', moreMenuSendImportSms: '.vn-menu [name="sendImportSms"]',

View File

@ -129,10 +129,10 @@ describe('Ticket descriptor path', () => {
}); });
describe('Make invoice', () => { 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'; const invoiceableTicketId = '14';
await page.loginAndModule('adminBoss', 'ticket'); await page.loginAndModule('administrative', 'ticket');
await page.accessToSearchResult(invoiceableTicketId); await page.accessToSearchResult(invoiceableTicketId);
await page.waitForState('ticket.card.summary'); await page.waitForState('ticket.card.summary');
}); });
@ -160,6 +160,18 @@ describe('Ticket descriptor path', () => {
expect(result).toEqual('T4444445'); 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', () => { describe('SMS', () => {

View File

@ -84,6 +84,7 @@
ng-show="$ctrl.isInvoiced" ng-show="$ctrl.isInvoiced"
vn-acl="invoicing" vn-acl="invoicing"
vn-acl-action="remove" vn-acl-action="remove"
name="regenerateInvoice"
translate> translate>
Regenerate invoice Regenerate invoice
</vn-item> </vn-item>