diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js
index f5f2c4050..a806bd99c 100644
--- a/e2e/helpers/selectors.js
+++ b/e2e/helpers/selectors.js
@@ -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',
diff --git a/e2e/paths/05-ticket/12_descriptor.spec.js b/e2e/paths/05-ticket/12_descriptor.spec.js
index dda549edd..c1258f973 100644
--- a/e2e/paths/05-ticket/12_descriptor.spec.js
+++ b/e2e/paths/05-ticket/12_descriptor.spec.js
@@ -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!');
+ });
+ });
});
diff --git a/modules/ticket/front/descriptor-menu/index.html b/modules/ticket/front/descriptor-menu/index.html
index 1ff1c14e3..70d213c7e 100644
--- a/modules/ticket/front/descriptor-menu/index.html
+++ b/modules/ticket/front/descriptor-menu/index.html
@@ -46,11 +46,13 @@
SMS Pending payment
SMS Minimum import