Fixes
This commit is contained in:
parent
84572dc398
commit
a177ad8e26
|
@ -1,7 +1,7 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
import selectors from '../../helpers/selectors.js';
|
||||||
import createNightmare from '../../helpers/nightmare';
|
import createNightmare from '../../helpers/nightmare';
|
||||||
|
|
||||||
fdescribe('Ticket descriptor path', () => {
|
describe('Ticket descriptor path', () => {
|
||||||
const nightmare = createNightmare();
|
const nightmare = createNightmare();
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
@ -114,7 +114,7 @@ fdescribe('Ticket descriptor path', () => {
|
||||||
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
||||||
.waitToClick(selectors.ticketDescriptor.moreMenuAddStowaway)
|
.waitToClick(selectors.ticketDescriptor.moreMenuAddStowaway)
|
||||||
.wait(selectors.ticketDescriptor.addStowawayDialogFirstTicket)
|
.wait(selectors.ticketDescriptor.addStowawayDialogFirstTicket)
|
||||||
.isVisible(selectors.ticketDescriptor.addStowawayDialogFirstTicket);
|
.visible(selectors.ticketDescriptor.addStowawayDialogFirstTicket);
|
||||||
|
|
||||||
expect(isVisible).toBeTruthy();
|
expect(isVisible).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
|
@ -40,19 +40,4 @@ describe('Component vnInputTime', () => {
|
||||||
expect(controller._value).toEqual(null);
|
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');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,17 +16,17 @@ describe('sale updateConcept()', () => {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it('should throw if ID was undefined', async() => {
|
it('should throw if ID was undefined', async() => {
|
||||||
|
let err;
|
||||||
const newConcept = 'I am he new concept';
|
const newConcept = 'I am he new concept';
|
||||||
|
|
||||||
await app.models.Sale.updateConcept(undefined, newConcept)
|
try {
|
||||||
.catch(response => {
|
await app.models.Sale.updateConcept(undefined, newConcept);
|
||||||
expect(response).toEqual(new Error(`Model::findById requiere el argumento id`));
|
} catch (e) {
|
||||||
error = response;
|
err = e;
|
||||||
});
|
}
|
||||||
|
|
||||||
expect(error).toBeDefined();
|
expect(err).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should update the sale concept', async() => {
|
it('should update the sale concept', async() => {
|
||||||
|
|
|
@ -10,13 +10,13 @@ module.exports = {
|
||||||
send(options) {
|
send(options) {
|
||||||
options.from = `${config.app.senderName} <${config.app.senderMail}>`;
|
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;
|
options.to = config.app.senderMail;
|
||||||
|
}
|
||||||
|
|
||||||
return this.transporter.sendMail(options);
|
return this.transporter.sendMail(options);
|
||||||
},
|
}
|
||||||
|
|
||||||
log() {
|
|
||||||
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue