This commit is contained in:
Juan Ferrer 2019-09-30 13:02:11 +02:00
parent 84572dc398
commit a177ad8e26
4 changed files with 15 additions and 30 deletions

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
fdescribe('Ticket descriptor path', () => {
describe('Ticket descriptor path', () => {
const nightmare = createNightmare();
beforeAll(() => {
@ -114,7 +114,7 @@ fdescribe('Ticket descriptor path', () => {
.waitToClick(selectors.ticketDescriptor.moreMenu)
.waitToClick(selectors.ticketDescriptor.moreMenuAddStowaway)
.wait(selectors.ticketDescriptor.addStowawayDialogFirstTicket)
.isVisible(selectors.ticketDescriptor.addStowawayDialogFirstTicket);
.visible(selectors.ticketDescriptor.addStowawayDialogFirstTicket);
expect(isVisible).toBeTruthy();
});

View File

@ -40,19 +40,4 @@ describe('Component vnInputTime', () => {
expect(controller._value).toEqual(null);
});
});
describe('step() setter/getter', () => {
it(`should set input.step to a given value`, () => {
controller.step = 2;
expect(controller.input.step).toEqual('2');
});
it(`should return a number`, () => {
controller.step = 2;
expect(controller.step).toEqual(2);
expect(typeof controller.step).toEqual('number');
});
});
});

View File

@ -16,17 +16,17 @@ describe('sale updateConcept()', () => {
done();
});
it('should throw if ID was undefined', async() => {
let err;
const newConcept = 'I am he new concept';
await app.models.Sale.updateConcept(undefined, newConcept)
.catch(response => {
expect(response).toEqual(new Error(`Model::findById requiere el argumento id`));
error = response;
});
try {
await app.models.Sale.updateConcept(undefined, newConcept);
} catch (e) {
err = e;
}
expect(error).toBeDefined();
expect(err).toBeDefined();
});
it('should update the sale concept', async() => {

View File

@ -10,13 +10,13 @@ module.exports = {
send(options) {
options.from = `${config.app.senderName} <${config.app.senderMail}>`;
if (process.env.NODE_ENV !== 'production')
if (process.env.NODE_ENV !== 'production') {
if (!config.smtp.user)
return Promise.resolve(true);
options.to = config.app.senderMail;
}
return this.transporter.sendMail(options);
},
log() {
},
}
};