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

This commit is contained in:
Daniel Herrero 2018-02-06 07:01:47 +01:00
commit 806734fb13
154 changed files with 3641 additions and 3601 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -1,4 +1,6 @@
extends: [eslint:recommended, google, plugin:jasmine/recommended]
parserOptions:
ecmaVersion: 2017
plugins:
- jasmine
env:
@ -17,3 +19,4 @@ rules:
no-eq-null: 0
no-console: 0
no-warning-comments: 0
no-empty: 0

7
.gitignore vendored
View File

@ -1,9 +1,4 @@
.DS_Store
node_modules
build
npm-debug.log
debug.log
datasources.test.json
datasources.development.json
.idea
.idea
docker-compose.yml

View File

@ -1,13 +1,11 @@
FROM node:6.9.1
FROM node:8.9.4
COPY auth /app
COPY loopback /loopback
COPY . /app
COPY ../loopback /loopback
WORKDIR /app
RUN npm install
RUN npm -g install pm2
CMD ["pm2-docker", "./server/server.js"]

View File

@ -1,31 +1,26 @@
# Project Title
# Salix
Salix is an Enterprise resource planning (ERP) integrated management of core business processes, in real-time and mediated by software and technology developed with the stack listed below.
This project is an Enterprise resource planning (ERP) integrated management of core business processes, in real-time and mediated by software and technology developed with the stack listed below.
Salix is also the scientific name of a beautifull tree! :)
### Prerequisites
## Prerequisites
Required applications.
* Node.js >= 8.9.4
* Node.js = 8.9.4
* NGINX
* Docker
You will need to install globally the following items.
```
$ npm install -g karma
$ npm install -g karma-cli
$ npm install -g gulp
$ npm install -g webpack
$ npm install -g nodemon
$ npm install -g karma-cli gulp webpack nodemon
```
## Getting Started // ### Installing
## Getting Started // Installing
Pull from repository.
Ask a senior developer for the datasources.development.json files required to run the project.
Run this commands on project root directory to install Node dependencies.
```
$ npm install
@ -37,35 +32,18 @@ Launch application in developer environment.
$ gulp
```
Also you can run backend and frontend as independent gulp tasks.
Launching frontend.
Also you can run backend and frontend as separately gulp tasks (including NGINX).
```
$ gulp client
```
Launching backend. It restarts NGINX and Node services.
```
$ gulp services
```
Start the local database before services on sequence.
```
$ gulp servicesDev
```
Manually reset local fixtures.
Manually reset fixtures.
```
$ gulp docker
```
To check docker images and containers status.
```
$ docker images
$ docker ps -a
```
## Running the tests
## Running the unit tests
For client-side unit tests run from project's root.
```
@ -77,18 +55,11 @@ For server-side unit tests run from project's root.
$ npm run test
```
### Break down into end to end tests
Run local database plus e2e paths.
For end-to-end tests run from project's root.
```
$ gulp e2e
```
Just the e2e paths as the fixtures are untainted.
```
$ npm run e2e
```
## Built With
* [angularjs](https://angularjs.org/)
@ -97,7 +68,6 @@ $ npm run e2e
* [loopback](https://loopback.io/)
* [docker](https://www.docker.com/)
* [gulp.js](https://gulpjs.com/)
## Versioning
We use [SourceTree](https://www.sourcetreeapp.com/) for versioning. For the versions available, see the [salix project](https://git.verdnatura.es).
* [Karma](https://karma-runner.github.io/)
* [Jasmine](https://jasmine.github.io/)
* [Nightmare](http://www.nightmarejs.org/)

View File

@ -1,6 +0,0 @@
{
"User": "User",
"Password": "Password",
"Do not close session": "Do not close session",
"Enter": "Enter"
}

View File

@ -0,0 +1,4 @@
User: User
Password: Password
Do not close session: Do not close session
Enter: Enter

View File

@ -1,6 +0,0 @@
{
"User": "Usuario",
"Password": "Contraseña",
"Do not close session": "No cerrar sesión",
"Enter": "Entrar"
}

View File

@ -0,0 +1,4 @@
User: Usuario
Password: Contraseña
Do not close session: No cerrar sesión
Enter: Entrar

View File

@ -1,11 +0,0 @@
{
"Street address": "Dirección postal",
"Default": "Predeterminado",
"Consignee": "Consignatario",
"Postcode": "Código postal",
"Town/City": "Ciudad",
"Province": "Provincia",
"Agency": "Agencia",
"Phone": "Teléfono",
"Mobile": "Móvil"
}

View File

@ -0,0 +1,9 @@
Street address: Dirección postal
Default: Predeterminado
Consignee: Consignatario
Postcode: Código postal
Town/City: Ciudad
Province: Provincia
Agency: Agencia
Phone: Teléfono
Mobile: Móvil

View File

@ -5,14 +5,16 @@ describe('Client', () => {
let $componentController;
let $state;
let controller;
let $httpBackend;
beforeEach(() => {
angular.mock.module('client');
});
beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
$componentController = _$componentController_;
$state = _$state_;
$httpBackend = _$httpBackend_;
$state.params.addressId = '1234';
controller = $componentController('vnAddressEdit', {$state: $state});
}));
@ -20,5 +22,16 @@ describe('Client', () => {
it('should define and set address property', () => {
expect(controller.address.id).toBe(1234);
});
describe('$onInit()', () => {
it('should perform a GET query to receive the address observations', () => {
let filter = {where: {addressFk: 1234}, include: [{relation: 'observationType'}]};
let json = {data: 'some notes'};
$httpBackend.when('GET', `/client/api/AddressObservations?filter=${JSON.stringify(filter)}`).respond(json);
$httpBackend.expectGET(`/client/api/AddressObservations?filter=${JSON.stringify(filter)}`);
controller.$onInit();
$httpBackend.flush();
});
});
});
});

View File

@ -1,4 +0,0 @@
{
"Enabled": "Activo",
"Is equalizated": "Recargo de equivalencia"
}

View File

@ -0,0 +1,2 @@
Enabled: Activo
Is equalizated: Recargo de equivalencia

View File

@ -1,3 +0,0 @@
{
"Set as default": "Establecer como predeterminado"
}

View File

@ -0,0 +1 @@
Set as default: Establecer como predeterminado

View File

@ -19,7 +19,7 @@
<vn-textfield vn-one
label="Email"
field="$ctrl.client.email"
info="You can save multiple emails by chaining them using comma without spaces, example: user@domain.com,user2@domain.com the first email will be considered as the main">
info="You can save multiple emails">
</vn-textfield>
</vn-horizontal>
<vn-horizontal>

View File

@ -1,13 +0,0 @@
{
"Comercial Name": "Nombre comercial",
"Tax number": "NIF/CIF",
"Social name": "Razón social",
"Phone": "Teléfono",
"Mobile": "Móvil",
"Fax": "Fax",
"Email": "Correo electrónico",
"Salesperson": "Comercial",
"Channel": "Canal",
"You can save multiple emails by chaining them using comma without spaces, example: user@domain.com,user2@domain.com the first email will be considered as the main": "Puede guardar varios correos electrónicos encadenándolos mediante comas sin espacios, ejemplo: user@dominio.com,user2@dominio.com siendo el primer correo electrónico el principal",
"Contact": "Contacto"
}

View File

@ -0,0 +1,14 @@
Comercial Name: Nombre comercial
Tax number: NIF/CIF
Social name: Razón social
Phone: Teléfono
Mobile: Móvil
Fax: Fax
Email: Correo electrónico
Salesperson: Comercial
Channel: Canal
You can save multiple emails: >-
Puede guardar varios correos electrónicos encadenándolos mediante comas
sin espacios, ejemplo: user@dominio.com, user2@dominio.com siendo el primer
correo electrónico el principal
Contact: Contacto

View File

@ -1,19 +0,0 @@
{
"Changed terms": "Has modificado las condiciones de pago",
"Notify customer?" : "¿Deseas notificar al cliente de dichos cambios?",
"No": "No",
"Yes, notify": "Sí, notificar",
"Notification sent!": "¡Notificación enviada!",
"Notification error": "Error al enviar notificación",
"You changes the equivalent tax": "Has cambiado el recargo de equivalencia",
"Do you want to spread the change to their consignees?" : "¿Deseas propagar el cambio a sus consignatarios?",
"Yes, propagate": "Si, propagar",
"Equivalent tax spreaded": "Recargo de equivalencia propagado",
"Invoice by address": "Facturar por consignatario",
"Equalization tax": "Recargo de equivalencia",
"Due day": "Vencimiento",
"Received core VNH": "Recibido core VNH",
"Received core VNL": "Recibido core VNL",
"Received B2B VNL": "Recibido B2B VNL",
"SAVE": "GUARDAR"
}

View File

@ -0,0 +1,17 @@
Changed terms: Has modificado las condiciones de pago
Notify customer?: ¿Deseas notificar al cliente de dichos cambios?
No: No
Yes, notify: Sí, notificar
Notification sent!: ¡Notificación enviada!
Notification error: Error al enviar notificación
You changes the equivalent tax: Has cambiado el recargo de equivalencia
Do you want to spread the change to their consignees?: ¿Deseas propagar el cambio a sus consignatarios?
Yes, propagate: Si, propagar
Equivalent tax spreaded: Recargo de equivalencia propagado
Invoice by address: Facturar por consignatario
Equalization tax: Recargo de equivalencia
Due day: Vencimiento
Received core VNH: Recibido core VNH
Received core VNL: Recibido core VNL
Received B2B VNL: Recibido B2B VNL
SAVE: GUARDAR

View File

@ -19,7 +19,7 @@
<vn-textfield vn-one label="User name" field="$ctrl.client.userName"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Email" field="$ctrl.client.email" info="You can save multiple emails by chaining them using comma without spaces, example: user@domain.com,user2@domain.com the first email will be considered as the main"></vn-textfield>
<vn-textfield vn-one label="Email" field="$ctrl.client.email" info="You can save multiple emails"></vn-textfield>
<vn-autocomplete vn-one
field="$ctrl.client.salesPersonFk"
url="/client/api/Clients/activeSalesPerson"

View File

@ -1,10 +0,0 @@
{
"Name": "Nombre",
"Tax number": "NIF/CIF",
"Business name": "Razón social",
"User name": "Nombre de usuario",
"Email": "Correo electrónico",
"Create and edit": "Crear y editar",
"Create": "Crear",
"You can save multiple emails by chaining them using comma without spaces, example: user@domain.com,user2@domain.com the first email will be considered as the main": "Puede guardar varios correos electrónicos encadenándolos mediante comas sin espacios, ejemplo: user@dominio.com,user2@dominio.com siendo el primer correo electrónico el principal"
}

View File

@ -0,0 +1,11 @@
Name: Nombre
Tax number: NIF/CIF
Business name: Razón social
User name: Nombre de usuario
Email: Correo electrónico
Create and edit: Crear y editar
Create: Crear
You can save multiple emails: >-
Puede guardar varios correos electrónicos encadenándolos mediante comas
sin espacios, ejemplo: user@dominio.com, user2@dominio.com siendo el primer
correo electrónico el principal

View File

@ -1,3 +0,0 @@
{
"Add credit": "Añadir crédito"
}

View File

@ -0,0 +1 @@
Add credit: Añadir crédito

View File

@ -1,5 +0,0 @@
{
"Since" : "Desde",
"Employee" : "Empleado",
"No results": "Sin resultados"
}

View File

@ -0,0 +1,3 @@
Since : Desde
Employee : Empleado
No results: Sin resultados

View File

@ -0,0 +1,31 @@
import './fiscal-data.js';
describe('Client', () => {
describe('Component vnClientFiscalData', () => {
let $componentController;
let $httpBackend;
let $scope;
let controller;
beforeEach(() => {
angular.mock.module('client');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
$componentController = _$componentController_;
$httpBackend = _$httpBackend_;
$scope = $rootScope.$new();
controller = $componentController('vnClientFiscalData', {$scope: $scope});
}));
describe('returnDialogEt()', () => {
it('should request to patch the propagation of tax status', () => {
controller.client = {id: 123, isEqualizated: false};
$httpBackend.when('PATCH', `/client/api/Clients/${controller.client.id}/addressesPropagateRe`, {isEqualizated: controller.client.isEqualizated}).respond('done');
$httpBackend.expectPATCH(`/client/api/Clients/${controller.client.id}/addressesPropagateRe`, {isEqualizated: controller.client.isEqualizated});
controller.returnDialogEt('ACCEPT');
$httpBackend.flush();
});
});
});
});

View File

@ -1,7 +0,0 @@
{
"Date" : "Fecha",
"Comment" : "Comentario",
"Amount" : "Importe",
"Type": "Tipo",
"Add Greuge": "Añadir Greuge"
}

View File

@ -0,0 +1,5 @@
Date: Fecha
Comment: Comentario
Amount: Importe
Type: Tipo
Add Greuge: Añadir Greuge

View File

@ -1,7 +0,0 @@
{
"Client id": "Id cliente",
"Phone": "Teléfono",
"Town/City": "Ciudad",
"Email": "Correo electrónico",
"Create client": "Crear cliente"
}

View File

@ -0,0 +1,5 @@
Client id: Id cliente
Phone: Teléfono
Town/City: Ciudad
Email: Correo electrónico
Create client: Crear cliente

View File

@ -1,4 +0,0 @@
{
"Client": "Client",
"Clients": "Clients"
}

View File

@ -0,0 +1,2 @@
Client: Client
Clients: Clients

View File

@ -1,25 +0,0 @@
{
"Active": "Activo",
"Client": "Cliente",
"Clients": "Clientes",
"Basic data": "Datos básicos",
"Fiscal data": "Datos Fiscales",
"Addresses": "Consignatarios",
"Web access": "Acceso web",
"Notes": "Notas",
"Has to invoice": "Factura",
"Invoice by mail": "Factura impresa",
"Country": "País",
"Street": "Domicilio fiscal",
"City": "Municipio",
"Postcode": "Código postal",
"Province": "Provincia",
"Save": "Guardar",
"Pay method" : "Forma de pago",
"Address": "Consignatario",
"Credit" : "Crédito",
"Secured credit": "Crédito asegurado",
"Verified data": "Datos comprobados",
"Mandate": "Mandato",
"Amount": "Importe"
}

View File

@ -0,0 +1,23 @@
Active: Activo
Client: Cliente
Clients: Clientes
Basic data: Datos básicos
Fiscal data: Datos Fiscales
Addresses: Consignatarios
Web access: Acceso web
Notes: Notas
Has to invoice: Factura
Invoice by mail: Factura impresa
Country: País
Street: Domicilio fiscal
City: Municipio
Postcode: Código postal
Province: Provincia
Save: Guardar
Pay method : Forma de pago
Address: Consignatario
Credit : Crédito
Secured credit: Crédito asegurado
Verified data: Datos comprobados
Mandate: Mandato
Amount: Importe

View File

@ -1,5 +0,0 @@
{
"Company": "Empresa",
"Register date": "Fecha alta",
"End date": "Fecha baja"
}

View File

@ -0,0 +1,3 @@
Company: Empresa
Register date: Fecha alta
End date: Fecha baja

View File

@ -1,4 +0,0 @@
{
"New note": "Nueva nota",
"Note": "Nota"
}

View File

@ -0,0 +1,2 @@
New note: Nueva nota
Note: Nota

View File

@ -1,10 +0,0 @@
{
"Client id": "Id cliente",
"Tax number": "NIF/CIF",
"Name": "Nombre",
"Social name": "Razon social",
"Town/City": "Ciudad",
"Postcode": "Código postal",
"Email": "Correo electrónico",
"Phone": "Teléfono"
}

View File

@ -0,0 +1,8 @@
Client id: Id cliente
Tax number: NIF/CIF
Name: Nombre
Social name: Razon social
Town/City: Ciudad
Postcode: Código postal
Email: Correo electrónico
Phone: Teléfono

View File

@ -1,41 +0,0 @@
import './search-panel.js';
describe('Client', () => {
describe('Component vnClientSearchPanel', () => {
let $componentController;
let sessionStorage;
let controller;
beforeEach(() => {
angular.mock.module('client');
});
beforeEach(angular.mock.inject((_$componentController_, _sessionStorage_) => {
$componentController = _$componentController_;
sessionStorage = _sessionStorage_;
controller = $componentController('vnClientSearchPanel', {sessionStorage: sessionStorage});
}));
// describe('onSearch()', () => {
// it('should call setStorageValue() and onSubmit()', () => {
// spyOn(controller, 'setStorageValue');
// spyOn(controller, 'onSubmit');
// controller.setStorageValue();
// controller.onSubmit();
// expect(controller.setStorageValue).toHaveBeenCalledWith();
// expect(controller.onSubmit).toHaveBeenCalledWith();
// });
// });
// describe('$onChanges()', () => {
// it('should set filter properties using the search values', () => {
// expect(controller.filter).not.toBeDefined();
// spyOn(sessionStorage, 'get').and.returnValue({data: 'data'});
// controller.$onChanges();
// expect(controller.filter).toBe(sessionStorage.get({data: 'data'}));
// });
// });
});
});

View File

@ -1,7 +0,0 @@
{
"User": "Usuario",
"Enable web access": "Habilitar acceso web",
"New password": "Nueva contraseña",
"Repeat password": "Repetir contraseña",
"Change password": "Cambiar contraseña"
}

View File

@ -0,0 +1,5 @@
User: Usuario
Enable web access: Habilitar acceso web
New password: Nueva contraseña
Repeat password: Repetir contraseña
Change password: Cambiar contraseña

View File

@ -121,7 +121,6 @@ describe('Component vnAutocomplete', () => {
it(`should perform a query if the item id isn't present in the controller.items property`, () => {
controller.url = 'test.com';
$httpBackend.whenGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`).respond();
$httpBackend.expectGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`);
controller.items = [{id: 1, name: 'test1'}, {id: 2, name: 'Bruce Wayne'}];
controller.field = 3;
@ -137,7 +136,6 @@ describe('Component vnAutocomplete', () => {
it(`should set field performing a query as the item id isn't present in the controller.items property`, () => {
controller.url = 'test.com';
$httpBackend.whenGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`).respond();
$httpBackend.expectGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`);
controller.items = [{id: 1, name: 'test1'}, {id: 2, name: 'Bruce Wayne'}];
controller.field = 3;

View File

@ -259,19 +259,22 @@ describe('Component vnDropDown', () => {
});
});
// describe('setScrollPosition()', () => {
// it(`should call child.scrollIntoView if defined `, () => {
// $element[0].firstChild.setAttribute('class', 'dropdown');
// let child = $element[0].firstChild.firstChild;
describe('setScrollPosition()', () => {
it(`should call child.scrollIntoView if defined `, () => {
$element[0].firstChild.setAttribute('class', 'dropdown');
$element[0].firstChild.firstChild.setAttribute('class', 'active');
let child = $element[0].firstChild.firstChild;
spyOn(child, 'getBoundingClientRect').and.returnValue({top: 100});
let container = $element[0].firstChild;
spyOn(container, 'getBoundingClientRect').and.returnValue({top: 10, height: 70});
child.scrollIntoView = () => {};
spyOn(child, 'scrollIntoView');
controller._activeOption = 0;
controller.setScrollPosition();
// child.scrollIntoView = () => {};
// spyOn(child, 'scrollIntoView');
// controller._activeOption = 0;
// controller.setScrollPosition();
// expect(child.scrollIntoView).toHaveBeenCalledWith();
// });
// });
expect(child.scrollIntoView).toHaveBeenCalledWith();
});
});
describe('selectItem()', () => {
it(`should pass item to selected and set controller._show to false`, () => {

View File

@ -1,59 +1,59 @@
import {module} from '../module';
import splitingRegister from './splitingRegister';
factory.$inject = ['$translatePartialLoader', '$http', '$window', '$ocLazyLoad', '$q', '$translate'];
export function factory($translatePartialLoader, $http, $window, $ocLazyLoad, $q, $translate) {
factory.$inject = ['$http', '$window', '$ocLazyLoad', '$translatePartialLoader', '$translate'];
export function factory($http, $window, $ocLazyLoad, $translatePartialLoader, $translate) {
class ModuleLoader {
constructor() {
this._loadedModules = {};
this._loaded = {};
}
load(moduleName, validations) {
if (this._loadedModules[moduleName])
return;
let loaded = this._loaded;
this._loadedModules[moduleName] = true;
if (loaded[moduleName])
return loaded[moduleName];
loaded[moduleName] = Promise.resolve(true);
let deps = splitingRegister.getDependencies(moduleName);
let modules = splitingRegister.modules;
let promises = [];
let depPromises = [];
if (deps)
for (let dep of deps)
depPromises.push(this.load(dep, validations));
loaded[moduleName] = new Promise((resolve, reject) => {
Promise.all(depPromises)
.then(() => {
let promises = [];
// FIXME: https://github.com/angular-translate/angular-translate/pull/1674
$translatePartialLoader.addPart(moduleName);
promises.push($translate.refresh());
if (validations)
promises.push(new Promise(resolve => {
$http.get(`/${moduleName}/validations`).then(
json => this.onValidationsReady(json, resolve),
json => resolve()
);
}));
for (let dep of deps) {
this._loadedModules[dep] = true;
promises.push(modules[dep]());
if (validations)
promises.push(new Promise(resolve => {
$http.get(`/${dep}/validations`).then(
json => this.onValidationsReady(json, resolve),
json => resolve()
);
splitingRegister.modules[moduleName](resolve);
}));
$translatePartialLoader.addPart(dep);
// FIXME: https://github.com/angular-translate/angular-translate/pull/1674
// promises.push($translate.refresh());
setTimeout(() => $translate.refresh(), 500);
}
let ocDeps = deps.map(item => {
return {name: item};
Promise.all(promises)
.then(() => {
this._loaded[moduleName] = true;
resolve($ocLazyLoad.load({name: moduleName}));
})
.catch(reject);
})
.catch(reject);
});
return new Promise(resolve => {
Promise.all(promises).then(
() => resolve($ocLazyLoad.load(ocDeps))
);
});
}
parseValidation(val) {
switch (val.validation) {
case 'custom':
// TODO: Reemplazar eval
val.bindedFunction = eval(`(${val.bindedFunction})`);
break;
case 'format':
val.with = new RegExp(val.with);
break;
}
return loaded[moduleName];
}
onValidationsReady(json, resolve) {
let entities = json.data;
@ -69,6 +69,17 @@ export function factory($translatePartialLoader, $http, $window, $ocLazyLoad, $q
Object.assign($window.validations, json.data);
resolve();
}
parseValidation(val) {
switch (val.validation) {
case 'custom':
// TODO: Replace eval
val.bindedFunction = eval(`(${val.bindedFunction})`);
break;
case 'format':
val.with = new RegExp(val.with);
break;
}
}
}
return new ModuleLoader();

View File

@ -1,29 +1,11 @@
class SplitingRegister {
constructor() {
this._graph = null;
this._modules = {};
this.graph = null;
this.modules = {};
}
get modules() {
return this._modules;
}
getDependencies(dependency) {
var array = [];
array.push(dependency);
var first = this._graph[dependency];
if (first)
while (first.length > 0) {
dependency = first.shift();
array = array.concat(this.getDependencies(dependency));
}
return array;
}
registerGraph(graph) {
this._graph = graph;
}
register(moduleName, loader) {
this._modules[moduleName] = loader;
getDependencies(moduleName) {
return this.graph[moduleName];
}
}

View File

@ -1,9 +0,0 @@
{
"Accept": "Accept",
"Cancel": "Cancel",
"Close": "Close",
"Clear": "Clear",
"Save": "Save",
"Add": "Add",
"Search": "Search"
}

View File

@ -0,0 +1,7 @@
Accept: Accept
Cancel: Cancel
Close: Close
Clear: Clear
Save: Save
Add: Add
Search: Search

View File

@ -1,11 +0,0 @@
{
"Accept": "Aceptar",
"Cancel": "Cancelar",
"Close": "Cerrar",
"Clear": "Borrar",
"Save": "Guardar",
"Add": "Añadir",
"Search": "Buscar",
"Show More": "Ver más",
"No more results" : "No hay más resultados"
}

View File

@ -0,0 +1,9 @@
Accept: Aceptar
Cancel: Cancelar
Close: Cerrar
Clear: Borrar
Save: Guardar
Add: Añadir
Search: Buscar
Show More: Ver más
No more results : No hay más resultados

View File

@ -1,6 +0,0 @@
{
"Are you sure exit without saving?": "¿Seguro que quieres salir sin guardar?",
"Unsaved changes will be lost": "Los cambios que no hayas guardado se perderán",
"No changes to save": "No hay cambios que guardar",
"Some fields are invalid": "Algunos campos no son válidos"
}

View File

@ -0,0 +1,4 @@
Are you sure exit without saving?: ¿Seguro que quieres salir sin guardar?
Unsaved changes will be lost: Los cambios que no hayas guardado se perderán
No changes to save: No hay cambios que guardar
Some fields are invalid: Algunos campos no son válidos

View File

@ -0,0 +1,33 @@
import './item-card.js';
describe('Item', () => {
describe('Component vnItemCard', () => {
let $componentController;
let $httpBackend;
let $state;
let controller;
beforeEach(() => {
angular.mock.module('item');
});
beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
$componentController = _$componentController_;
$httpBackend = _$httpBackend_;
$state = _$state_;
controller = $componentController('vnItemCard', {$state: $state});
}));
describe('$onInit()', () => {
it('should request to patch the propagation of tax status', () => {
controller.client = {id: 123, isEqualizated: false};
$httpBackend.whenGET('/item/api/Items/undefined?filter={"include":[{"relation":"itemType"},{"relation":"origin"},{"relation":"ink"},{"relation":"producer"},{"relation":"intrastat"},{"relation":"expence"},{"relation":"taxClass"},{"relation":"itemTag","scope":{"order":"priority ASC","include":{"relation":"tag"}}}]}').respond({data: 'item'});
$httpBackend.expectGET('/item/api/Items/undefined?filter={"include":[{"relation":"itemType"},{"relation":"origin"},{"relation":"ink"},{"relation":"producer"},{"relation":"intrastat"},{"relation":"expence"},{"relation":"taxClass"},{"relation":"itemTag","scope":{"order":"priority ASC","include":{"relation":"tag"}}}]}');
controller.$onInit();
$httpBackend.flush();
expect(controller.item).toEqual({data: 'item'});
});
});
});
});

View File

@ -0,0 +1,46 @@
import './item-create.js';
describe('Item', () => {
describe('Component vnItemCreate', () => {
let $componentController;
let $scope;
let $state;
let controller;
beforeEach(() => {
angular.mock.module('item');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_) => {
$componentController = _$componentController_;
$scope = $rootScope.$new();
$state = _$state_;
$scope.watcher = {
submit: () => {
return {
then: callback => {
callback({data: {id: 1}});
}
};
}
};
controller = $componentController('vnItemCreate', {$scope: $scope});
}));
it('should define and set scope, state and item properties', () => {
expect(controller.$).toEqual($scope);
expect(controller.$state).toEqual($state);
expect(controller.item).toEqual({relevancy: 0});
});
describe('onSubmit()', () => {
it(`should call submit() on the watcher then expect a callback`, () => {
spyOn($state, 'go');
controller.onSubmit();
expect(controller.$state.go).toHaveBeenCalledWith('item.card.data', {id: 1});
});
});
});
});

View File

@ -9,10 +9,9 @@
<vn-auto pad-medium>
<div><span translate>Id</span>: <b>{{$ctrl.item.id}}</b></div>
<div><span translate>Name</span>: <b>{{$ctrl.item.name}}</b></div>
<div><span translate>{{$ctrl.item.itemTag[0].tag.name}}</span>: <b>{{$ctrl.item.itemTag[0].value}}</b></div>
<div><span translate>{{$ctrl.item.itemTag[1].tag.name}}</span>: <b>{{$ctrl.item.itemTag[1].value}}</b></div>
<div><span translate>{{$ctrl.item.itemTag[2].tag.name}}</span>: <b>{{$ctrl.item.itemTag[2].value}}</b></div>
<div><span translate>{{$ctrl.item.itemTag[3].tag.name}}</span>: <b>{{$ctrl.item.itemTag[3].value}}</b></div>
<div ng-repeat="itemTag in $ctrl.item.itemTag | limitTo:4">
<div><span translate>{{itemTag.tag.name}}</span>: <b>{{itemTag.value}}</b></div>
</div>
</vn-auto>
</vn-vertical>
</vn-card>

View File

@ -1,5 +0,0 @@
{
"Ink": "Tinta",
"Origin": "Origen",
"Producer": "Productor"
}

View File

@ -0,0 +1,3 @@
Ink: Tinta
Origin: Origen
Producer: Productor

View File

@ -1,20 +0,0 @@
{
"Items": "Artículos",
"Item": "Artículo",
"Category": "Categoría",
"Description": "Descripción",
"Size": "Tamaño",
"Type": "Tipo",
"Name": "Nombre",
"Relevancy": "Relevancia",
"New item": "Nuevo artículo",
"Basic data": "Datos básicos",
"History" : "Historial",
"Item history" : "Historial del artículo",
"Item tags" : "Tags del artículo",
"Niche": "Nicho",
"Picture": "Foto",
"Item pictures": "Fotos del artículo",
"Barcode": "Código barras",
"Item barcode": "Código de barras del artículo"
}

View File

@ -0,0 +1,18 @@
Items: Artículos
Item: Artículo
Category: Categoría
Description: Descripción
Size: Tamaño
Type: Tipo
Name: Nombre
Relevancy: Relevancia
New item: Nuevo artículo
Basic data: Datos básicos
History: Historial
Item history: Historial del artículo
Item tags: Tags del artículo
Niche: Nicho
Picture: Foto
Item pictures: Fotos del artículo
Barcode: Código barras
Item barcode: Código de barras del artículo

View File

@ -1 +0,0 @@
{}

View File

@ -0,0 +1,4 @@
Routes locator: Routes locator
Filter: Filter
Store: Store
Address: Address

View File

@ -1,6 +0,0 @@
{
"Routes locator": "Localizador de rutas",
"Filter": "Filtro",
"Store": "Almacén",
"Address": "Dirección"
}

View File

@ -0,0 +1,4 @@
Routes locator: Localizador de rutas
Filter: Filtro
Store: Almacén
Address: Dirección

View File

@ -1,10 +0,0 @@
{
"salix": [],
"auth": [],
"core": [],
"client": [],
"production": [],
"route": [],
"locator": [],
"item": []
}

8
client/modules.yml Normal file
View File

@ -0,0 +1,8 @@
salix: []
auth: []
core: []
client: []
production: []
route: []
locator: []
item: []

View File

@ -8,7 +8,7 @@ export default class ProductionIndex {
this.$http = $http;
this.filter = {};
this.tickets = [];
this.checkAll = 0;
this.footer = {
total: null,
@ -35,58 +35,53 @@ export default class ProductionIndex {
}
// Actions Callbacks
_changeState(ids, sateteId, stateName, index) {
this.$http.put(`/production/api/TicketStates/${sateteId}/changeState`, {tickets: ids}).then(
() => {
index.forEach(
val => {
this.tickets[val].state = stateName;
this.tickets[val].stateFk = sateteId;
}
);
}
);
_changeState(ids, stateId, stateName, index) {
this.$http.put(`/production/api/TicketStates/${stateId}/changeState`, {tickets: ids}).then(() => {
index.forEach(val => {
this.tickets[val].state = stateName;
this.tickets[val].stateFk = stateId;
});
});
}
_sendMessage(tickets) {
this.$http.post(`/production/api/FakeProductions/messageSend`, {tickets: tickets}).then(
() => {
this.vnApp.showMessage(this.$translate.instant('Success: message send!'));
}
);
this.$http.post(`/production/api/FakeProductions/messageSend`, {tickets: tickets}).then(() => {
this.vnApp.showMessage(this.$translate.instant('Success: message send!'));
});
}
_changeTime(ids, time, index) {
this.$http.put(`/production/api/Tickets/${time}/changeTime`, {tickets: ids}).then(
() => {
index.forEach(
val => {
this.tickets[val].hour = time;
}
);
}
);
this.$http.put(`/production/api/Tickets/${time}/changeTime`, {tickets: ids}).then(() => {
index.forEach(val => {
this.tickets[val].hour = time;
});
});
}
searchTickets(filter) {
this.$.index.filter.filter = Object.assign({}, this.filter, filter || {});
this.checkAll = 0;
this.$.index.accept().then(
json => {
this.tickets = json.tickets;
this.footer.lines = json.lines;
this.footer.meters = json.m3;
this.footer.total = json.total;
}
);
this.$.index.accept().then(json => {
this.tickets = json.tickets;
this.footer.lines = json.lines;
this.footer.meters = json.m3;
this.footer.total = json.total;
});
}
refreshTickets() {
this.filter = {};
this.filter.warehouseFk = this.$.displayValue = this.userProfile.warehouseId;
}
onChangeWareHouse(warehouse) {
if (warehouse && warehouse != this.filter.warehouseFk) {
this.filter.warehouseFk = warehouse;
this.searchTickets(this.filter);
}
}
$onInit() {
for (let i = 1; i <= 24; i++) {
let hour = [i].join('');

View File

@ -0,0 +1,39 @@
import './index.js';
describe('Production', () => {
describe('Component vnProductionIndex', () => {
let $componentController;
let $httpBackend;
let $scope;
let controller;
let $element;
let aclConstant;
beforeEach(() => {
angular.mock.module('production');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
$element = angular.element('<div></div>');
$componentController = _$componentController_;
$httpBackend = _$httpBackend_;
$scope = $rootScope.$new();
aclConstant = {userProfile: {warehouseId: 1}};
controller = $componentController('vnProductionIndex', {$scope: $scope, $element: $element, aclConstant: aclConstant});
}));
describe('_changeState()', () => {
it('should request to update the ticket state', () => {
let ids = [1, 2, 3, 4];
let stateId = 1;
let stateName = 'the state!';
let index = [];
controller.tickets = ['ticketVal'];
$httpBackend.whenPUT('/production/api/TicketStates/1/changeState', {tickets: ids}).respond({data: 'ticketVal'});
$httpBackend.expectPUT('/production/api/TicketStates/1/changeState', {tickets: ids});
controller._changeState(ids, stateId, stateName, index);
$httpBackend.flush();
});
});
});
});

View File

@ -1,3 +0,0 @@
{
"Production" : "Production"
}

View File

@ -0,0 +1 @@
Production: Production

View File

@ -1,30 +0,0 @@
{
"Finder" : "Localizador",
"Production" : "Producción",
"Error: No tickets selected!" : "Error: ¡No hay tickets seleccionados!",
"Error: Action not implemented!" : "Error: ¡Acción no implementada!",
"State" : "Estado",
"Alarm" : "Alarma",
"Agencies": "Agencias",
"Agency": "Agencia",
"Store" : "Almacén",
"Printed": "Impreso",
"Commercial": "Comercial",
"Hour" : "Hora",
"Lines" : "Líneas",
"Boxes" : "Cajas",
"Comment" : "Comentario",
"Message" : "Mensaje",
"Send" : "Enviar",
"Date" : "Fecha",
"Ticket ID" : "ID Ticket",
"Route ID": "ID Ruta",
"Province" : "Provincia",
"Filter" : "Filtrar",
"Cancel" : "Cancelar",
"Worker" : "Trabajador",
"Town" : "Población",
"Client ID" : "ID Cliente",
"Ticket with incidence" : "Ticket con incidencia"
}

View File

@ -0,0 +1,27 @@
Finder: Localizador
Production: Producción
'Error: No tickets selected!': 'Error: ¡No hay tickets seleccionados!'
'Error: Action not implemented!': 'Error: ¡Acción no implementada!'
State: Estado
Alarm: Alarma
Agencies: Agencias
Agency: Agencia
Store: Almacén
Printed: Impreso
Commercial: Comercial
Hour: Hora
Lines: Líneas
Boxes: Cajas
Comment: Comentario
Message: Mensaje
Send: Enviar
Date: Fecha
Ticket ID: ID Ticket
Route ID: ID Ruta
Province: Provincia
Filter: Filtrar
Cancel: Cancelar
Worker: Trabajador
Town: Población
Client ID: ID Cliente
Ticket with incidence: Ticket con incidencia

View File

@ -1,3 +0,0 @@
{
"Routes" : "Routes"
}

View File

@ -0,0 +1 @@
Routes: Routes

View File

@ -1,17 +0,0 @@
{
"Basic data": "Datos básicos",
"Logistic data": "Datos logísticos",
"Assigned tickets": "Tickets asignados",
"Routes" : "Rutas",
"Route" : "Ruta",
"Date": "Fecha",
"Agency": "Agencia",
"Driver": "Conductor",
"Vehicle": "Vehículo",
"Start Hour" : "Hora Inicio",
"End Hour": "Hora Fin",
"Start Km": "Km Inicio",
"End Km": "Km Fin",
"Packages": "Bultos",
"Route document": "Documento de Ruta"
}

View File

@ -0,0 +1,15 @@
Basic data: Datos básicos
Logistic data: Datos logísticos
Assigned tickets: Tickets asignados
Routes: Rutas
Route: Ruta
Date: Fecha
Agency: Agencia
Driver: Conductor
Vehicle: Vehículo
Start Hour: Hora Inicio
End Hour: Hora Fin
Start Km: Km Inicio
End Km: Km Fin
Packages: Bultos
Route document: Documento de Ruta

View File

@ -1,10 +0,0 @@
{
"Client id": "Id cliente",
"Tax number": "NIF/CIF",
"Name": "Nombre",
"Social name": "Razon social",
"Town/City": "Ciudad",
"Postcode": "Código postal",
"Email": "Correo electrónico",
"Phone": "Teléfono"
}

View File

@ -0,0 +1,8 @@
Client id: Id cliente
Tax number: NIF/CIF
Name: Nombre
Social name: Razon social
Town/City: Ciudad
Postcode: Código postal
Email: Correo electrónico
Phone: Teléfono

View File

@ -1,5 +1,4 @@
import './module';
import './spliting';
import './configroutes';
import './config';
import './run';

View File

@ -1,6 +1,6 @@
import './spliting';
import deps from 'client/modules.json';
import ngModule from './module';
import deps from 'client/modules.yml';
import modules from 'client/spliting';
import {splitingRegister} from 'core';
function loader(moduleName, validations) {
@ -13,7 +13,9 @@ function loader(moduleName, validations) {
config.$inject = ['$stateProvider', '$urlRouterProvider', 'aclServiceProvider', 'modulesFactoryProvider'];
function config($stateProvider, $urlRouterProvider, aclServiceProvider, modulesFactory) {
splitingRegister.registerGraph(deps);
splitingRegister.graph = deps;
splitingRegister.modules = modules;
let aclService = aclServiceProvider.$get();
function getParams(route) {
@ -61,7 +63,7 @@ function config($stateProvider, $urlRouterProvider, aclServiceProvider, modulesF
configRoute.abstract = true;
if (route.routeParams)
configRoute.params = route.routeParams;
$stateProvider.state(route.state, configRoute);
} else if (route.state === mainModule.state) {
break;

View File

@ -1,13 +0,0 @@
{
"Applications": "Applications",
"Home": "Home",
"Notifications":"Notifications",
"Logout": "Logout",
"Change language": "Change language",
"Profile": "Profile",
"Data saved!": "Data saved!",
"Can't contact with server": "Can't contact with server",
"Push on applications menu": "To open a module push on applications menu",
"Clients": "Clients",
"Modules access": "Modules access"
}

View File

@ -0,0 +1,11 @@
Applications: Applications
Home: Home
Notifications: Notifications
Logout: Logout
Change language: Change language
Profile: Profile
Data saved!: Data saved!
Can't contact with server: Can't contact with server
Push on applications menu: To open a module push on applications menu
Clients: Clients
Modules access: Modules access

View File

@ -1,21 +0,0 @@
{
"Applications": "Aplicaciones",
"Home": "Inicio",
"Notifications":"Notificaciones",
"Logout": "Cerrar sesión",
"Change language": "Cambiar idioma",
"Profile": "Perfil",
"Data saved!": "¡Datos guardados!",
"Can't contact with server": "No se pudo contactar con el servidor",
"Push on applications menu": "Para abrir un módulo pulsa en el menú de aplicaciones",
"Clients": "Clientes",
"Routes" : "Rutas",
"Production" : "Producción",
"Modules access" : "Acceso a módulos",
"Locator": "Localizador",
"Items": "Artículos",
"name": "Nombre",
"credit": "Crédito",
"phone": "Teléfono",
"creditInsurance": "Crédito Asegurado"
}

View File

@ -0,0 +1,19 @@
Applications: Aplicaciones
Home: Inicio
Notifications: Notificaciones
Logout: Cerrar sesión
Change language: Cambiar idioma
Profile: Perfil
Data saved!: ¡Datos guardados!
Can't contact with server: No se pudo contactar con el servidor
Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones
Clients: Clientes
Routes : Rutas
Production : Producción
Modules access : Acceso a módulos
Locator: Localizador
Items: Artículos
name: Nombre
credit: Crédito
phone: Teléfono
creditInsurance: Crédito Asegurado

View File

@ -1,56 +0,0 @@
import * as core from 'core';
export const client = () => {
return new Promise(resolve => {
require.ensure([], () => {
require('client');
resolve('client');
}, 'client');
});
};
core.splitingRegister.register('client', client);
export const production = () => {
return new Promise(resolve => {
require.ensure([], () => {
require('production');
resolve('production');
}, 'production');
});
};
core.splitingRegister.register('production', production);
export const route = () => {
return new Promise(resolve => {
require.ensure([], () => {
require('route');
resolve('route');
}, 'route');
});
};
core.splitingRegister.register('route', route);
export const locator = () => {
return new Promise(resolve => {
require.ensure([], () => {
require('locator');
resolve('locator');
}, 'locator');
});
};
core.splitingRegister.register('locator', locator);
export const item = () => {
return new Promise(resolve => {
require.ensure([], () => {
require('item');
resolve('item');
}, 'item');
});
};
core.splitingRegister.register('item', item);

12
client/spliting.js Normal file
View File

@ -0,0 +1,12 @@
export default {
client:
cb => require.ensure([], () => cb(require('client'))),
production:
cb => require.ensure([], () => cb(require('production'))),
route:
cb => require.ensure([], () => cb(require('route'))),
locator:
cb => require.ensure([], () => cb(require('locator'))),
item:
cb => require.ensure([], () => cb(require('item')))
};

12
docker-compose.tpl.yml Normal file
View File

@ -0,0 +1,12 @@
version: '2'
services:
nginx:
container_name: "${BRANCH_NAME}-nginx"
image: "nginx:${TAG}"
privileged: true
build:
context: ./services/nginx
ports:
- "80:80"
mem_limit: 200m
links: []

View File

@ -1,103 +0,0 @@
version: '2'
services:
auth:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-auth"
image: "auth:${TAG}"
build:
context: ./services
dockerfile: /auth/Dockerfile
ports:
- "3000:3000"
salix:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-salix"
image: "salix:${TAG}"
build:
context: ./services
dockerfile: /salix/Dockerfile
ports:
- "3001:3001"
client:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-client"
image: "client:${TAG}"
build:
context: ./services
dockerfile: /client/Dockerfile
ports:
- "3002:3002"
mailer:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-mailer"
image: "mailer:${TAG}"
build:
context: ./services/mailer
ports:
- "3003:3003"
production:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-production"
image: "production:${TAG}"
build:
context: ./services
dockerfile: /production/Dockerfile
ports:
- "3004:3004"
route:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-route"
image: "route:${TAG}"
build:
context: ./services
dockerfile: /route/Dockerfile
ports:
- "3005:3005"
print:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-print"
image: "print:${TAG}"
build:
context: ./services
dockerfile: /print/Dockerfile
ports:
- "3006:3006"
item:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-item"
image: "item:${TAG}"
build:
context: ./services
dockerfile: /item/Dockerfile
ports:
- "3007:3007"
nginx:
container_name: "${BRANCH_NAME}-nginx"
image: "nginx:${TAG}"
privileged: true
build:
context: ./services/nginx
ports:
- "80:80"
mem_limit: 200m
links:
- "auth:${BRANCH_NAME}-auth"
- "salix:${BRANCH_NAME}-salix"
- "client:${BRANCH_NAME}-client"
- "mailer:${BRANCH_NAME}-mailer"
- "production:${BRANCH_NAME}-production"
- "route:${BRANCH_NAME}-route"
- "print:${BRANCH_NAME}-print"

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('create client path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('Edit basicData path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('Edit fiscalData path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('Edit pay method path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('Edit addresses path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('Edit web access path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('Add notes path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('Add credit path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

View File

@ -8,19 +8,6 @@ const moduleAccessViewHashURL = '#!/';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
describe('Add greuge path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
.login()
.waitForURL(moduleAccessViewHashURL)
.waitToClick(selectors.globalItems.logOutButton)
.then(() => {
done();
})
.catch(catchErrors(done));
});
});
it('should log in', done => {
nightmare
.login()

Some files were not shown because too many files have changed in this diff Show More