diff --git a/back/methods/chat/sendMessage.js b/back/methods/chat/sendMessage.js index f3510a098..ac1d3c956 100644 --- a/back/methods/chat/sendMessage.js +++ b/back/methods/chat/sendMessage.js @@ -70,6 +70,12 @@ module.exports = Self => { } function send(uri, body) { + if (process.env.NODE_ENV !== 'production') { + return new Promise(resolve => { + return resolve({statusCode: 200, message: 'Fake notification sent'}); + }); + } + const options = { method: 'POST', uri: uri, diff --git a/back/methods/chat/spec/send.spec.js b/back/methods/chat/spec/send.spec.js new file mode 100644 index 000000000..5b01def9b --- /dev/null +++ b/back/methods/chat/spec/send.spec.js @@ -0,0 +1,11 @@ +const app = require('vn-loopback/server/server'); + +describe('chat sendMessage()', () => { + it('should return a response', async() => { + let ctx = {req: {accessToken: {userId: 1}}}; + let response = await app.models.Chat.sendMessage(ctx, '@salesPerson', 'I changed something'); + + expect(response.statusCode).toEqual(200); + expect(response.message).toEqual('Fake notification sent'); + }); +}); diff --git a/e2e/paths/05-ticket-module/12_descriptor.spec.js b/e2e/paths/05-ticket-module/12_descriptor.spec.js index 81bb75bdb..9442f1be0 100644 --- a/e2e/paths/05-ticket-module/12_descriptor.spec.js +++ b/e2e/paths/05-ticket-module/12_descriptor.spec.js @@ -9,8 +9,7 @@ describe('Ticket descriptor path', () => { .loginAndModule('salesperson', 'ticket'); }); - // Excluded waiting for #1874 - xdescribe('Delete ticket', () => { + describe('Delete ticket', () => { it('should search for an specific ticket', async() => { const result = await nightmare .write(selectors.ticketsIndex.searchTicketInput, 18) diff --git a/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js b/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js index 737645d85..890fc6c45 100644 --- a/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js +++ b/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js @@ -1,7 +1,6 @@ const app = require('vn-loopback/server/server'); -// Excluded waiting for #1874 -xdescribe('ticket deleted()', () => { +describe('ticket deleted()', () => { let ticket; let ctx; diff --git a/print/common/css/email.css b/print/common/css/email.css index a4489f6d2..3bb9225c8 100644 --- a/print/common/css/email.css +++ b/print/common/css/email.css @@ -3,13 +3,17 @@ * */ body { - background-color: #EEE; + -webkit-text-size-adjust: none; + -ms-text-size-adjust: none; + background-color: #FFF; + font-weight: 400; color: #555; margin: 0 } .grid { - background-color: #EEE + background-color: #FFF + } .grid a { @@ -17,10 +21,10 @@ body { } .grid-block { - min-width: 320px; + min-width: 300px; max-width: 600px; - margin: 0 auto; - width: 600px + width: 600px; + margin: 0 auto } h1 { diff --git a/print/common/css/layout.css b/print/common/css/layout.css index dc0c9b7b4..a3a43a9c4 100644 --- a/print/common/css/layout.css +++ b/print/common/css/layout.css @@ -4,8 +4,8 @@ */ .grid { - font-family: "Roboto", "Helvetica", "Arial", sans-serif; - font-size: 16px; + font-family: Helvetica, Arial, sans-serif; + font-size: 16px !important; width: 100% } diff --git a/print/core/components/email-footer/assets/css/style.css b/print/core/components/email-footer/assets/css/style.css index 6e6dc755b..4bc22fdfd 100644 --- a/print/core/components/email-footer/assets/css/style.css +++ b/print/core/components/email-footer/assets/css/style.css @@ -1,4 +1,5 @@ .buttons { + font-size: 14px !important; width: 100% } diff --git a/print/core/components/email-footer/attachments.json b/print/core/components/email-footer/attachments.json index 4f3bee667..0d339b76f 100644 --- a/print/core/components/email-footer/attachments.json +++ b/print/core/components/email-footer/attachments.json @@ -8,17 +8,7 @@ "filename": "twitter.png", "path": "/assets/images/twitter.png", "cid": "twitter.png" - }, - { - "filename": "youtube.png", - "path": "/assets/images/youtube.png", - "cid": "youtube.png" - }, - { - "filename": "pinterest.png", - "path": "/assets/images/pinterest.png", - "cid": "pinterest.png" - }, + }, { "filename": "instagram.png", "path": "/assets/images/instagram.png", diff --git a/print/core/components/email-footer/email-footer.html b/print/core/components/email-footer/email-footer.html index 5b2652cb1..b60125c5d 100644 --- a/print/core/components/email-footer/email-footer.html +++ b/print/core/components/email-footer/email-footer.html @@ -29,12 +29,6 @@ Twitter - - Youtube - - - Pinterest - Instagram diff --git a/print/templates/email/claim-pickup-order/claim-pickup-order.html b/print/templates/email/claim-pickup-order/claim-pickup-order.html index de08d8d8c..139c11a40 100644 --- a/print/templates/email/claim-pickup-order/claim-pickup-order.html +++ b/print/templates/email/claim-pickup-order/claim-pickup-order.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }} diff --git a/print/templates/email/client-welcome/client-welcome.html b/print/templates/email/client-welcome/client-welcome.html index 88eaf56d0..e410405c7 100644 --- a/print/templates/email/client-welcome/client-welcome.html +++ b/print/templates/email/client-welcome/client-welcome.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }} diff --git a/print/templates/email/delivery-note/delivery-note.html b/print/templates/email/delivery-note/delivery-note.html index ff6186eb2..9e24d8437 100644 --- a/print/templates/email/delivery-note/delivery-note.html +++ b/print/templates/email/delivery-note/delivery-note.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }} diff --git a/print/templates/email/driver-route/driver-route.html b/print/templates/email/driver-route/driver-route.html index 33fcebd22..f70be019e 100644 --- a/print/templates/email/driver-route/driver-route.html +++ b/print/templates/email/driver-route/driver-route.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }} diff --git a/print/templates/email/letter-debtor-nd/letter-debtor-nd.html b/print/templates/email/letter-debtor-nd/letter-debtor-nd.html index 7a2ae877a..b2b0967f3 100644 --- a/print/templates/email/letter-debtor-nd/letter-debtor-nd.html +++ b/print/templates/email/letter-debtor-nd/letter-debtor-nd.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }} diff --git a/print/templates/email/letter-debtor-st/letter-debtor-st.html b/print/templates/email/letter-debtor-st/letter-debtor-st.html index 039885e86..74d610698 100644 --- a/print/templates/email/letter-debtor-st/letter-debtor-st.html +++ b/print/templates/email/letter-debtor-st/letter-debtor-st.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }} diff --git a/print/templates/email/payment-update/payment-update.html b/print/templates/email/payment-update/payment-update.html index 27c9352ef..cc1ec1e7a 100644 --- a/print/templates/email/payment-update/payment-update.html +++ b/print/templates/email/payment-update/payment-update.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }} diff --git a/print/templates/email/printer-setup/printer-setup.html b/print/templates/email/printer-setup/printer-setup.html index 08ef588d4..abc28db33 100644 --- a/print/templates/email/printer-setup/printer-setup.html +++ b/print/templates/email/printer-setup/printer-setup.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }} diff --git a/print/templates/email/sepa-core/sepa-core.html b/print/templates/email/sepa-core/sepa-core.html index 1708099a9..4f3900262 100644 --- a/print/templates/email/sepa-core/sepa-core.html +++ b/print/templates/email/sepa-core/sepa-core.html @@ -1,6 +1,8 @@ + + {{ $t('subject') }}