Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2587-supplier_minor_changes
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Bernat Exposito 2020-11-19 09:17:58 +01:00
commit 8d60f3fa45
3 changed files with 35 additions and 3 deletions

View File

@ -421,6 +421,10 @@ export default {
moreMenuRestoreTicket: '.vn-menu [name="restoreTicket"]',
moreMenuMakeInvoice: '.vn-menu [name="makeInvoice"]',
moreMenuChangeShippedHour: '.vn-menu [name="changeShipped"]',
moreMenuPaymentSMS: '.vn-menu [name="sendPaymentSms"]',
moreMenuSendImportSms: '.vn-menu [name="sendImportSms"]',
SMStext: 'textarea[name="message"]',
sendSMSbutton: 'button[response="accept"]',
changeShippedHourDialog: '.vn-dialog.shown',
changeShippedHour: '.vn-dialog.shown vn-input-time[ng-model="$ctrl.newShipped"]',
addStowawayDialogFirstTicket: '.vn-dialog.shown vn-table vn-tbody vn-tr',

View File

@ -39,7 +39,7 @@ describe('Ticket descriptor path', () => {
expect(result).toContain('08:15');
});
it('should delete the ticket using the descriptor more menu', async() => {
it('should delete the ticket using the descriptor menu', async() => {
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteTicket);
await page.waitToClick(selectors.ticketDescriptor.acceptDialog);
@ -64,7 +64,7 @@ describe('Ticket descriptor path', () => {
});
describe('Restore ticket', () => {
it('should restore the ticket using the descriptor more menu', async() => {
it('should restore the ticket using the descriptor menu', async() => {
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitToClick(selectors.ticketDescriptor.moreMenuRestoreTicket);
await page.waitToClick(selectors.ticketDescriptor.acceptDialog);
@ -148,7 +148,7 @@ describe('Ticket descriptor path', () => {
expect(result).toEqual('-');
});
it('should invoice the ticket using the descriptor more menu', async() => {
it('should invoice the ticket using the descriptor menu', async() => {
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenuMakeInvoice);
@ -165,4 +165,30 @@ describe('Ticket descriptor path', () => {
expect(result).toEqual('T4444445');
});
});
describe('SMS', () => {
it('should send the payment SMS using the descriptor menu', async() => {
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenuPaymentSMS);
await page.waitForSelector(selectors.ticketDescriptor.SMStext);
await page.waitPropertyLength(selectors.ticketDescriptor.SMStext, 'value', 128);
await page.waitToClick(selectors.ticketDescriptor.sendSMSbutton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('SMS sent!');
});
it('should send the import SMS using the descriptor menu', async() => {
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenuSendImportSms);
await page.waitForSelector(selectors.ticketDescriptor.SMStext);
await page.waitPropertyLength(selectors.ticketDescriptor.SMStext, 'value', 144);
await page.waitToClick(selectors.ticketDescriptor.sendSMSbutton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('SMS sent!');
});
});
});

View File

@ -46,11 +46,13 @@
</vn-item>
<vn-item
ng-click="$ctrl.sendPaymentSms()"
name="sendPaymentSms"
translate>
SMS Pending payment
</vn-item>
<vn-item
ng-click="$ctrl.sendImportSms()"
name="sendImportSms"
translate>
SMS Minimum import
</vn-item>