removed global variable serviceRoot
This commit is contained in:
parent
2673a36578
commit
8cbde4c137
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('message send()', () => {
|
||||
it('should call the send method and return the response', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('userConfig getUserConfig()', () => {
|
||||
it(`should return the configuration data of a given user`, async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('workerMana getCurrentWorkerMana()', () => {
|
||||
it('should get the mana of the logged worker', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('loopback model Account', () => {
|
||||
it('should return true if the user has the given role', async() => {
|
||||
|
|
|
@ -11,8 +11,6 @@ let verbose = false;
|
|||
if (process.argv[2] === '--v')
|
||||
verbose = true;
|
||||
|
||||
serviceRoot = `${__dirname}/../loopback`;
|
||||
|
||||
let Jasmine = require('jasmine');
|
||||
let jasmine = new Jasmine();
|
||||
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Model crud()', () => {
|
||||
let insertId;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Model getSetValues()', () => {
|
||||
it('should extend getSetValues properties to any model passed', () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Model rewriteDbError()', () => {
|
||||
it('should extend rewriteDbError properties to any model passed', () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
// xcluded waiting for fixtures
|
||||
xdescribe('claimBeginning', () => {
|
||||
let ticket;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Claim importTicketSales()', () => {
|
||||
let claimEnds;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Claim Create', () => {
|
||||
let newDate = new Date();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('claim getSummary()', () => {
|
||||
it('should return summary with claim, salesClaimed, developments and actions defined ', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
// xcluded waiting for fixtures
|
||||
xdescribe('regularizeClaim()', () => {
|
||||
const claimFk = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Update Claim', () => {
|
||||
let newDate = new Date();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client activeWorkersWithRole', () => {
|
||||
it('should return the sales people as result', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client addressesPropagateRe', () => {
|
||||
let client;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client confirmTransaction', () => {
|
||||
const transactionId = 2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client Create', () => {
|
||||
const clientName = 'Wade';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('client getAverageInvoiced()', () => {
|
||||
it('should call the getAverageInvoiced method', done => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client card', () => {
|
||||
it('should call the card() method to receive a formated card of Bruce Wayne', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
xdescribe('client getDebt()', () => {
|
||||
it('should return the client debt', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('client getMana()', () => {
|
||||
it('should call the getMana method', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client getTransations', () => {
|
||||
it('should call getTransations() method to receive a list of Web Payments from Bruce Wayne', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client hasCustomerRole', () => {
|
||||
it('should call the hasCustomerRole() method with a customer id', done => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client isValidClient', () => {
|
||||
it('should call the isValidClient() method with a client id and receive true', done => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client listWorkers', () => {
|
||||
it('should call the listWorkers()', done => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('client summary()', () => {
|
||||
it('should return a summary object containing data', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client updateFiscalData', () => {
|
||||
afterAll(async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client createWithInsurance', () => {
|
||||
let classificationId;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('receipt filter()', () => {
|
||||
it('should call the filter method', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('loopback model address', () => {
|
||||
let createdAddressId;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item filterItemTags()', () => {
|
||||
it('should filter ItemTags table', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item clone()', () => {
|
||||
let nextItemId;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item filter()', () => {
|
||||
it('should return 1 result using filter and tags', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item getShipped()', () => {
|
||||
it('should return 3 entries, the first one with the property balance -100', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item getLastEntries()', () => {
|
||||
it('should return one entry for a given item', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item getSummary()', () => {
|
||||
it('should return summary with item, tags, botanical, niches, available and visible defined ', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item new()', () => {
|
||||
let item;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('regularize()', () => {
|
||||
const itemFk = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item updateTaxes()', () => {
|
||||
afterAll(async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('loopback model Item', () => {
|
||||
describe('availableId()', () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order addToOrder()', () => {
|
||||
let rowToDelete;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order removes()', () => {
|
||||
let row;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
describe('order catalogFilter()', () => {
|
||||
it('should return an array of items', async() => {
|
||||
let filter = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order getTaxes()', () => {
|
||||
it('should call the getTaxes method and return undefined if its called with a string', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order getTotal()', () => {
|
||||
it('should return the total', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order getTotalVolume()', () => {
|
||||
it('should return the total', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order getVAT()', () => {
|
||||
it('should call the getVAT method and return the response', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order getVolumes()', () => {
|
||||
it('should return the volumes of a given order id', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order isEditable()', () => {
|
||||
it('should return false when the given order is not editable', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
let UserError = require('vn-loopback/util/user-error');
|
||||
|
||||
describe('order new()', () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('order summary()', () => {
|
||||
it('should return a summary object containing data from 1 order', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Order updateBasicData', () => {
|
||||
afterAll(async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket listPackaging()', () => {
|
||||
it('should call the listPackaging method and return the response', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket listSaleTracking()', () => {
|
||||
it('should call the listSaleTracking method and return the response', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('sale getClaimableFromTicket()', () => {
|
||||
it('should return the claimable sales of a given ticket', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('sale moveToTicket()', () => {
|
||||
it('should throw an error if the ticket is not editable', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('sale priceDifference()', () => {
|
||||
it('should return ticket price differences', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('sale removes()', () => {
|
||||
let sale;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('sale reserve()', () => {
|
||||
afterAll(async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('sale updatePrice()', () => {
|
||||
it('should throw an error if the price is not a number', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('sale updateQuantity()', () => {
|
||||
it('should throw an error if the quantity is not a number', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket changeState()', () => {
|
||||
let ticket;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket componentUpdate()', () => {
|
||||
let firstvalueBeforeChange;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket deleted()', () => {
|
||||
let ticket;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket filter()', () => {
|
||||
it('should call the filter method', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getLanded()', () => {
|
||||
it('should return a landing date', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getSales()', () => {
|
||||
it('should return the sales of a ticket', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getSalesPersonMana()', () => {
|
||||
it('should get the mana of a salesperson of a given ticket', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getShipped()', () => {
|
||||
it('should return a shipment date', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getTaxes()', () => {
|
||||
it('should return the tax of a given ticket', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getTotal()', () => {
|
||||
it('should return the total of a ticket', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getTotalVolume()', () => {
|
||||
it('should return the total volume of a ticket', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getVAT()', () => {
|
||||
it('should call the getVAT method and return the response', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket getVolume()', () => {
|
||||
it('should call the getVolume method', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket isEditable()', () => {
|
||||
it('should return false if the ticket given is not editable', async () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket new()', () => {
|
||||
let ticket;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket summary()', () => {
|
||||
it('should return a summary object containing data from 1 ticket', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket threeLastActive()', () => {
|
||||
it('should return the last three active tickets', async() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('loopback model State', () => {
|
||||
describe('isAlertLevelZero()', () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const app = require(`${serviceRoot}/server/server`);
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('ticket model TicketTracking', () => {
|
||||
let ticketTrackingId;
|
||||
|
|
Loading…
Reference in New Issue