small refactors
This commit is contained in:
parent
c0c4961717
commit
58042027cf
|
@ -9,7 +9,7 @@ describe('Service acl', () => {
|
|||
$provide.value('aclConstant', {});
|
||||
}));
|
||||
|
||||
beforeEach(inject((_aclService_, $httpBackend) => {
|
||||
beforeEach(inject(_aclService_ => {
|
||||
aclService = _aclService_;
|
||||
}));
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue