Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
gerard 2018-08-21 11:27:54 +02:00
commit c48b8c4b99
6 changed files with 50 additions and 9 deletions

View File

@ -1 +1,2 @@
node_modules
node_modules
services/nginx/*

View File

@ -1,7 +1,6 @@
<button type="{{::$ctrl.type}}" class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
<span translate>{{$ctrl.label}}</span>
<vn-icon
icon="{{::$ctrl.icon}}"
class="{{::$ctrl.icon}}">
icon="{{::$ctrl.icon}}">
</vn-icon>
</button>

View File

@ -1,5 +1,5 @@
vn-button {
& i {
& i[class="material-icons"] {
margin-top: 6px;
}
}

View File

@ -1,9 +1,9 @@
.icon-flor:before { content: '\e800'; } /* '' */
.icon-flower:before { content: '\e800'; } /* '' */
.icon-volume:before { content: '\e801'; } /* '' */
.icon-barcode:before { content: '\e802'; } /* '' */
.icon-bucket:before { content: '\e803'; } /* '' */
.icon-complementos:before { content: '\e804'; } /* '' */
.icon-accessory:before { content: '\e804'; } /* '' */
.icon-dfiscales:before { content: '\e805'; } /* '' */
.icon-doc:before { content: '\e806'; } /* '' */
.icon-eye:before { content: '\e807'; } /* '' */
@ -34,8 +34,8 @@
.icon-reserva:before { content: '\e828'; } /* '' */
.icon-entry:before { content: '\e829'; } /* '' */
.icon-transaction:before { content: '\e82b'; } /* '' */
.icon-verde:before { content: '\e82c'; } /* '' */
.icon-greenery:before { content: '\e82c'; } /* '' */
.icon-regentry:before { content: '\e82d'; } /* '' */
.icon-planta:before { content: '\e82e'; } /* '' */
.icon-plant:before { content: '\e82e'; } /* '' */
.icon-artificial:before { content: '\e82f'; } /* '' */
.icon-confeccion:before { content: '\e830'; } /* '' */
.icon-handmade:before { content: '\e830'; } /* '' */

View File

@ -0,0 +1,28 @@
import './main-menu.js';
describe('Component vnMainMenu', () => {
let $httpBackend;
let controller;
beforeEach(() => {
angular.mock.module('salix');
});
beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
let modulesFactory = {getModules: () => {}};
$httpBackend = _$httpBackend_;
$httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = _$componentController_('vnMainMenu', {modulesFactory: modulesFactory});
}));
describe('getCurrentUserName()', () => {
it(`should set the user name property in the controller`, () => {
$httpBackend.when('GET', `/auth/api/Accounts/getCurrentUserName`).respond('Batman');
$httpBackend.expect('GET', `/auth/api/Accounts/getCurrentUserName`);
controller.getCurrentUserName();
$httpBackend.flush();
expect(controller.$.currentUserName).toEqual('Batman');
});
});
});

View File

@ -0,0 +1,13 @@
const app = require(`${servicesDir}/ticket/server/server`);
describe('ticket getTotalVolume()', () => {
it('should return the total volume of a ticket', async() => {
let ticketFk = 1;
let expectedResult = 0.276;
let result = await app.models.Ticket.getTotalVolume(ticketFk);
expect(result.totalVolume).toEqual(expectedResult);
});
});