small refactors

This commit is contained in:
Carlos Jimenez 2018-08-30 16:15:30 +02:00
parent c0c4961717
commit 58042027cf
3 changed files with 10 additions and 15 deletions

View File

@ -9,7 +9,7 @@ describe('Service acl', () => {
$provide.value('aclConstant', {});
}));
beforeEach(inject((_aclService_, $httpBackend) => {
beforeEach(inject(_aclService_ => {
aclService = _aclService_;
}));

View File

@ -63,7 +63,7 @@ describe('Client', () => {
.waitToClick(selectors.clientBasicData.basicDataButton)
.wait(selectors.clientBasicData.nameInput)
.waitToClick(selectors.clientWebAccess.webAccessButton)
.wait(selectors.clientWebAccess.enableWebAccessCheckbox) // ahora lo dejamos mejor
.wait(selectors.clientWebAccess.enableWebAccessCheckbox)
.evaluate(selector => {
return document.querySelector(selector).checked;
}, selectors.clientWebAccess.enableWebAccessCheckbox)

View File

@ -1,22 +1,17 @@
const app = require(`${servicesDir}/ticket/server/server`);
describe('ticket listSaleTracking()', () => {
it('should call the listSaleTracking method and return the response', done => {
it('should call the listSaleTracking method and return the response', async() => {
let filter = {where: {ticketFk: 1}};
app.models.SaleTracking.listSaleTracking(filter)
.then(response => {
expect(response[0].concept).toEqual('Gem of Time');
done();
});
let result = await app.models.SaleTracking.listSaleTracking(filter);
expect(result[0].concept).toEqual('Gem of Time');
});
it(`should call the listSaleTracking method and return zero if doesn't have lines`, done => {
it(`should call the listSaleTracking method and return zero if doesn't have lines`, async() => {
let filter = {where: {ticketFk: 2}};
app.models.SaleTracking.listSaleTracking(filter)
.then(response => {
expect(response.length).toEqual(0);
done();
});
let result = await app.models.SaleTracking.listSaleTracking(filter);
expect(result.length).toEqual(0);
});
});