This commit is contained in:
Carlos Jimenez Ruiz 2019-10-01 07:56:26 +02:00
commit 6c438a9109
16 changed files with 507 additions and 1080 deletions

2
Jenkinsfile vendored
View File

@ -72,7 +72,7 @@ pipeline {
steps { steps {
nodejs('node-lts') { nodejs('node-lts') {
sh 'jest --ci --reporters=default --reporters=jest-junit --maxWorkers=1' sh 'jest --ci --reporters=default --reporters=jest-junit --maxWorkers=1'
sh 'gulp backTestDockerOnce --junit --random --run-chown' sh 'gulp backTestDockerOnce --junit --random'
} }
} }
} }

View File

@ -483,26 +483,28 @@ let actions = {
checkboxState: function(selector, done) { checkboxState: function(selector, done) {
this.wait(selector) this.wait(selector)
.evaluate(checkboxSelector => { .evaluate(selector => {
return document.querySelector(checkboxSelector).getAttribute('class'); let checkbox = document.querySelector(selector);
switch (checkbox.$ctrl.field) {
case null:
return 'intermediate';
case true:
return 'checked';
default:
return 'unchecked';
}
}, selector) }, selector)
.then(elementClass => { .then(res => done(null, res))
let classList = elementClass.split(' '); .catch(done);
let className; },
if (classList.includes('md-checked')) isDisabled: function(selector, done) {
className = 'checked'; this.wait(selector)
if (classList.includes('md-intermediate')) .evaluate(selector => {
className = 'intermediate'; let element = document.querySelector(selector);
if (!classList.includes('md-intermediate') && !classList.includes('md-checked')) return element.$ctrl.disabled;
className = 'unchecked'; }, selector)
.then(res => done(null, res))
if (!className)
throw new Error(`selector: ${selector} is not a md-checkbox`);
done(null, className);
})
.then(done)
.catch(done); .catch(done);
}, },

View File

@ -62,29 +62,29 @@ export default {
fiscalDataButton: 'vn-left-menu a[ui-sref="client.card.fiscalData"]', fiscalDataButton: 'vn-left-menu a[ui-sref="client.card.fiscalData"]',
socialNameInput: `${components.vnTextfield}[name="socialName"]`, socialNameInput: `${components.vnTextfield}[name="socialName"]`,
fiscalIdInput: `${components.vnTextfield}[name="fi"]`, fiscalIdInput: `${components.vnTextfield}[name="fi"]`,
equalizationTaxCheckbox: 'vn-check[label="Is equalizated"] md-checkbox', equalizationTaxCheckbox: 'vn-check[label="Is equalizated"]',
acceptPropagationButton: 'vn-client-fiscal-data > vn-confirm button[response=ACCEPT]', acceptPropagationButton: 'vn-client-fiscal-data > vn-confirm button[response=ACCEPT]',
addressInput: `${components.vnTextfield}[name="street"]`, addressInput: `${components.vnTextfield}[name="street"]`,
postcodeInput: `${components.vnTextfield}[name="postcode"]`, postcodeInput: `${components.vnTextfield}[name="postcode"]`,
cityInput: `${components.vnTextfield}[name="city"]`, cityInput: `${components.vnTextfield}[name="city"]`,
provinceAutocomplete: 'vn-autocomplete[field="$ctrl.client.provinceFk"]', provinceAutocomplete: 'vn-autocomplete[field="$ctrl.client.provinceFk"]',
countryAutocomplete: 'vn-autocomplete[field="$ctrl.client.countryFk"]', countryAutocomplete: 'vn-autocomplete[field="$ctrl.client.countryFk"]',
activeCheckbox: 'vn-check[label="Active"] md-checkbox', activeCheckbox: 'vn-check[label="Active"]',
frozenCheckbox: 'vn-check[label="Frozen"] md-checkbox', frozenCheckbox: 'vn-check[label="Frozen"]',
invoiceByAddressCheckbox: 'vn-check[label="Invoice by address"] md-checkbox', invoiceByAddressCheckbox: 'vn-check[label="Invoice by address"]',
verifiedDataCheckbox: 'vn-check[label="Verified data"] md-checkbox', verifiedDataCheckbox: 'vn-check[label="Verified data"]',
hasToInvoiceCheckbox: 'vn-check[label="Has to invoice"] md-checkbox', hasToInvoiceCheckbox: 'vn-check[label="Has to invoice"]',
invoiceByMailCheckbox: 'vn-check[label="Invoice by mail"] md-checkbox', invoiceByMailCheckbox: 'vn-check[label="Invoice by mail"]',
viesCheckbox: 'vn-check[label="Vies"] md-checkbox', viesCheckbox: 'vn-check[label="Vies"]',
saveButton: `${components.vnSubmit}` saveButton: `${components.vnSubmit}`
}, },
clientBillingData: { clientBillingData: {
payMethodAutocomplete: 'vn-autocomplete[field="$ctrl.client.payMethodFk"]', payMethodAutocomplete: 'vn-autocomplete[field="$ctrl.client.payMethodFk"]',
IBANInput: `${components.vnTextfield}[name="iban"]`, IBANInput: `${components.vnTextfield}[name="iban"]`,
dueDayInput: `${components.vnInputNumber}[name="dueDay"]`, dueDayInput: `${components.vnInputNumber}[name="dueDay"]`,
receivedCoreLCRCheckbox: 'vn-check[label="Received LCR"] md-checkbox', receivedCoreLCRCheckbox: 'vn-check[label="Received LCR"]',
receivedCoreVNLCheckbox: 'vn-check[label="Received core VNL"] md-checkbox', receivedCoreVNLCheckbox: 'vn-check[label="Received core VNL"]',
receivedB2BVNLCheckbox: 'vn-check[label="Received B2B VNL"] md-checkbox', receivedB2BVNLCheckbox: 'vn-check[label="Received B2B VNL"]',
swiftBicAutocomplete: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"]', swiftBicAutocomplete: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"]',
clearswiftBicButton: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] > div > div > div > vn-icon > i', clearswiftBicButton: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] > div > div > div > vn-icon > i',
newBankEntityButton: 'vn-client-billing-data vn-icon-button[vn-tooltip="New bank entity"] > button', newBankEntityButton: 'vn-client-billing-data vn-icon-button[vn-tooltip="New bank entity"] > button',
@ -97,7 +97,7 @@ export default {
clientAddresses: { clientAddresses: {
addressesButton: 'vn-left-menu a[ui-sref="client.card.address.index"]', addressesButton: 'vn-left-menu a[ui-sref="client.card.address.index"]',
createAddress: `vn-client-address-index ${components.vnFloatButton}`, createAddress: `vn-client-address-index ${components.vnFloatButton}`,
defaultCheckboxInput: 'vn-check[label="Default"] md-checkbox', defaultCheckboxInput: 'vn-check[label="Default"]',
consigneeInput: `${components.vnTextfield}[name="nickname"]`, consigneeInput: `${components.vnTextfield}[name="nickname"]`,
streetAddressInput: `${components.vnTextfield}[name="street"]`, streetAddressInput: `${components.vnTextfield}[name="street"]`,
postcodeInput: `${components.vnTextfield}[name="postalCode"]`, postcodeInput: `${components.vnTextfield}[name="postalCode"]`,
@ -110,8 +110,8 @@ export default {
secondMakeDefaultStar: 'vn-client-address-index vn-card div:nth-child(2) vn-icon-button[icon="star_border"]', secondMakeDefaultStar: 'vn-client-address-index vn-card div:nth-child(2) vn-icon-button[icon="star_border"]',
firstEditAddress: 'vn-client-address-index div:nth-child(1) > a', firstEditAddress: 'vn-client-address-index div:nth-child(1) > a',
secondEditAddress: 'vn-client-address-index div:nth-child(2) > a', secondEditAddress: 'vn-client-address-index div:nth-child(2) > a',
activeCheckbox: 'vn-check[label="Enabled"] md-checkbox', activeCheckbox: 'vn-check[label="Enabled"]',
equalizationTaxCheckbox: 'vn-client-address-edit vn-check[label="Is equalizated"] md-checkbox', equalizationTaxCheckbox: 'vn-client-address-edit vn-check[label="Is equalizated"]',
firstObservationTypeAutocomplete: 'vn-client-address-edit [name=observations] :nth-child(1) [field="observation.observationTypeFk"]', firstObservationTypeAutocomplete: 'vn-client-address-edit [name=observations] :nth-child(1) [field="observation.observationTypeFk"]',
firstObservationDescriptionInput: 'vn-client-address-edit [name=observations] :nth-child(1) [model="observation.description"] input', firstObservationDescriptionInput: 'vn-client-address-edit [name=observations] :nth-child(1) [model="observation.description"] input',
secondObservationTypeAutocomplete: 'vn-client-address-edit [name=observations] :nth-child(2) [field="observation.observationTypeFk"]', secondObservationTypeAutocomplete: 'vn-client-address-edit [name=observations] :nth-child(2) [field="observation.observationTypeFk"]',
@ -123,7 +123,7 @@ export default {
}, },
clientWebAccess: { clientWebAccess: {
webAccessButton: 'vn-left-menu a[ui-sref="client.card.webAccess"]', webAccessButton: 'vn-left-menu a[ui-sref="client.card.webAccess"]',
enableWebAccessCheckbox: 'vn-check[label="Enable web access"] md-checkbox', enableWebAccessCheckbox: 'vn-check[label="Enable web access"]',
userNameInput: `${components.vnTextfield}[name="name"]`, userNameInput: `${components.vnTextfield}[name="name"]`,
saveButton: `${components.vnSubmit}` saveButton: `${components.vnSubmit}`
}, },
@ -172,7 +172,7 @@ export default {
}, },
webPayment: { webPayment: {
confirmFirstPaymentButton: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon-button[icon="done_all"]', confirmFirstPaymentButton: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon-button[icon="done_all"]',
firstPaymentConfirmed: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon[icon="check"][aria-hidden="false"]' firstPaymentConfirmed: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon[icon="check"]'
}, },
dms: { dms: {
deleteFileButton: 'vn-client-dms-index vn-table vn-tr:nth-child(1) vn-icon-button[icon="delete"]', deleteFileButton: 'vn-client-dms-index vn-table vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
@ -194,17 +194,17 @@ export default {
fieldsToShowForm: 'vn-item-index > div > vn-card > div > vn-table > div.ng-scope > div > vn-dialog > div > form', fieldsToShowForm: 'vn-item-index > div > vn-card > div > vn-table > div.ng-scope > div > vn-dialog > div > form',
firstItemImage: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1)', firstItemImage: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1)',
firstItemId: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(2)', firstItemId: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(2)',
idCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(2) > vn-check > md-checkbox', idCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(2) > vn-check',
stemsCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(3) > vn-check > md-checkbox', stemsCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(3) > vn-check',
sizeCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(4) > vn-check > md-checkbox', sizeCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(4) > vn-check',
nicheCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(5) > vn-check > md-checkbox', nicheCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(5) > vn-check',
typeCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(6) > vn-check > md-checkbox', typeCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(6) > vn-check',
categoryCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(7) > vn-check > md-checkbox', categoryCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(7) > vn-check',
intrastadCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(8) > vn-check > md-checkbox', intrastadCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(8) > vn-check',
originCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(9) > vn-check > md-checkbox', originCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(9) > vn-check',
buyerCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(10) > vn-check > md-checkbox', buyerCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(10) > vn-check',
destinyCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(11) > vn-check > md-checkbox', destinyCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(11) > vn-check',
taxClassCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(12) > vn-check > md-checkbox', taxClassCheckbox: 'vn-item-index vn-dialog form vn-horizontal:nth-child(12) > vn-check',
saveFieldsButton: 'vn-item-index vn-dialog vn-horizontal:nth-child(16) > vn-button > button' saveFieldsButton: 'vn-item-index vn-dialog vn-horizontal:nth-child(16) > vn-button > button'
}, },
itemCreateView: { itemCreateView: {
@ -236,8 +236,8 @@ export default {
originAutocomplete: 'vn-autocomplete[field="$ctrl.item.originFk"]', originAutocomplete: 'vn-autocomplete[field="$ctrl.item.originFk"]',
expenceAutocomplete: 'vn-autocomplete[field="$ctrl.item.expenceFk"]', expenceAutocomplete: 'vn-autocomplete[field="$ctrl.item.expenceFk"]',
longNameInput: 'vn-textfield[field="$ctrl.item.longName"] input', longNameInput: 'vn-textfield[field="$ctrl.item.longName"] input',
isActiveCheckbox: 'vn-check[label="Active"] md-checkbox', isActiveCheckbox: 'vn-check[label="Active"]',
priceInKgCheckbox: 'vn-check[label="Price in kg"] md-checkbox', priceInKgCheckbox: 'vn-check[label="Price in kg"]',
submitBasicDataButton: `${components.vnSubmit}` submitBasicDataButton: `${components.vnSubmit}`
}, },
itemTags: { itemTags: {
@ -430,7 +430,7 @@ export default {
firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)', firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)',
firstSaleColour: 'vn-tr:nth-child(1) vn-fetched-tags section', firstSaleColour: 'vn-tr:nth-child(1) vn-fetched-tags section',
firstSaleLength: 'vn-ticket-sale vn-tr:nth-child(1) vn-td-editable:nth-child(6) section:nth-child(3)', firstSaleLength: 'vn-ticket-sale vn-tr:nth-child(1) vn-td-editable:nth-child(6) section:nth-child(3)',
firstSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(1) vn-check[field="sale.checked"] md-checkbox', firstSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(1) vn-check[field="sale.checked"]',
secondSaleColour: 'vn-tr:nth-child(2) vn-fetched-tags section', secondSaleColour: 'vn-tr:nth-child(2) vn-fetched-tags section',
secondSalePrice: 'vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(7) > span', secondSalePrice: 'vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(7) > span',
secondSaleDiscount: 'vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(8)', secondSaleDiscount: 'vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(8)',
@ -444,9 +444,9 @@ export default {
secondSaleConceptCell: 'vn-ticket-sale vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td-editable:nth-child(6)', secondSaleConceptCell: 'vn-ticket-sale vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td-editable:nth-child(6)',
secondSaleConceptInput: 'vn-ticket-sale vn-table vn-tr:nth-child(2) > vn-td-editable.ng-isolate-scope.selected vn-textfield input', secondSaleConceptInput: 'vn-ticket-sale vn-table vn-tr:nth-child(2) > vn-td-editable.ng-isolate-scope.selected vn-textfield input',
totalImport: 'vn-ticket-sale > vn-vertical > vn-card > div > vn-vertical > vn-horizontal > vn-one > p:nth-child(3) > strong', totalImport: 'vn-ticket-sale > vn-vertical > vn-card > div > vn-vertical > vn-horizontal > vn-one > p:nth-child(3) > strong',
selectAllSalesCheckbox: 'vn-ticket-sale vn-thead vn-check md-checkbox', selectAllSalesCheckbox: 'vn-ticket-sale vn-thead vn-check',
secondSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(2) vn-check[field="sale.checked"] md-checkbox', secondSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(2) vn-check[field="sale.checked"]',
thirdSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(3) vn-check[field="sale.checked"] md-checkbox', thirdSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(3) vn-check[field="sale.checked"]',
deleteSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="delete"]', deleteSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="delete"]',
transferSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="call_split"]', transferSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="call_split"]',
moveToTicketInput: '.vn-popover.shown vn-textfield[model="$ctrl.transfer.ticketId"] input', moveToTicketInput: '.vn-popover.shown vn-textfield[model="$ctrl.transfer.ticketId"] input',
@ -579,7 +579,7 @@ export default {
firstLineDestination: 'vn-claim-action vn-tr:nth-child(1) vn-autocomplete[field="saleClaimed.claimDestinationFk"]', firstLineDestination: 'vn-claim-action vn-tr:nth-child(1) vn-autocomplete[field="saleClaimed.claimDestinationFk"]',
secondLineDestination: 'vn-claim-action vn-tr:nth-child(2) vn-autocomplete[field="saleClaimed.claimDestinationFk"]', secondLineDestination: 'vn-claim-action vn-tr:nth-child(2) vn-autocomplete[field="saleClaimed.claimDestinationFk"]',
firstDeleteLine: 'vn-claim-action vn-tr:nth-child(1) vn-icon-button[icon="delete"]', firstDeleteLine: 'vn-claim-action vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
isPaidWithManaCheckbox: 'vn-check[field="$ctrl.claim.isChargedToMana"] md-checkbox' isPaidWithManaCheckbox: 'vn-check[field="$ctrl.claim.isChargedToMana"]'
}, },
ordersIndex: { ordersIndex: {
searchResult: 'vn-order-index vn-card > div > vn-table > div > vn-tbody > a.vn-tr', searchResult: 'vn-order-index vn-card > div > vn-table > div > vn-tbody > a.vn-tr',
@ -662,7 +662,7 @@ export default {
thirdTicketPriority: 'vn-route-tickets vn-tr:nth-child(3) vn-textfield[model="ticket.priority"] input', thirdTicketPriority: 'vn-route-tickets vn-tr:nth-child(3) vn-textfield[model="ticket.priority"] input',
fourthTicketPriority: 'vn-route-tickets vn-tr:nth-child(4) vn-textfield[model="ticket.priority"] input', fourthTicketPriority: 'vn-route-tickets vn-tr:nth-child(4) vn-textfield[model="ticket.priority"] input',
eleventhTicketPriority: 'vn-route-tickets vn-tr:nth-child(11) vn-textfield[model="ticket.priority"] input', eleventhTicketPriority: 'vn-route-tickets vn-tr:nth-child(11) vn-textfield[model="ticket.priority"] input',
firstTicketCheckbox: 'vn-route-tickets vn-tr:nth-child(1) vn-check md-checkbox', firstTicketCheckbox: 'vn-route-tickets vn-tr:nth-child(1) vn-check',
buscamanButton: 'vn-route-tickets vn-button[icon="icon-buscaman"]', buscamanButton: 'vn-route-tickets vn-button[icon="icon-buscaman"]',
firstTicketDeleteButton: 'vn-route-tickets vn-tr:nth-child(1) vn-icon[icon="delete"]', firstTicketDeleteButton: 'vn-route-tickets vn-tr:nth-child(1) vn-icon[icon="delete"]',
confirmButton: 'vn-route-tickets > vn-confirm button[response="ACCEPT"]' confirmButton: 'vn-route-tickets > vn-confirm button[response="ACCEPT"]'

View File

@ -53,10 +53,7 @@ describe('Client lock verified data path', () => {
it('should confirm verified data button is enabled for administrative', async() => { it('should confirm verified data button is enabled for administrative', async() => {
const result = await nightmare const result = await nightmare
.wait(selectors.clientFiscalData.verifiedDataCheckbox) .isDisabled(selectors.clientFiscalData.verifiedDataCheckbox);
.evaluate(selector => {
return document.querySelector(selector).disabled;
}, selectors.clientFiscalData.verifiedDataCheckbox);
expect(result).toBeFalsy(); expect(result).toBeFalsy();
}); });
@ -107,13 +104,10 @@ describe('Client lock verified data path', () => {
}); });
it('should confirm verified data button is disabled once again for salesPerson', async() => { it('should confirm verified data button is disabled once again for salesPerson', async() => {
const isChecked = await nightmare const isDisabled = await nightmare
.waitForClassPresent(selectors.clientFiscalData.verifiedDataCheckbox, 'md-checked') .isDisabled(selectors.clientFiscalData.verifiedDataCheckbox);
.evaluate(selector => {
return document.querySelector(selector).getAttribute('disabled');
}, selectors.clientFiscalData.verifiedDataCheckbox);
expect(isChecked).toBeTruthy(); expect(isDisabled).toBeTruthy();
}); });
it('should not be able to save change throwing a verified data error', async() => { it('should not be able to save change throwing a verified data error', async() => {
@ -138,12 +132,9 @@ describe('Client lock verified data path', () => {
it('should confirm verified data button is enabled for salesAssistant', async() => { it('should confirm verified data button is enabled for salesAssistant', async() => {
const isDisabled = await nightmare const isDisabled = await nightmare
.waitForClassPresent(selectors.clientFiscalData.verifiedDataCheckbox, 'md-checked') .isDisabled(selectors.clientFiscalData.verifiedDataCheckbox);
.evaluate(selector => {
return document.querySelector(selector).getAttribute('aria-disabled');
}, selectors.clientFiscalData.verifiedDataCheckbox);
expect(isDisabled).toEqual('false'); expect(isDisabled).toBeFalsy();
}); });
it('should now edit the social name', async() => { it('should now edit the social name', async() => {
@ -174,13 +165,10 @@ describe('Client lock verified data path', () => {
}); });
it('should confirm verified data button is enabled once again', async() => { it('should confirm verified data button is enabled once again', async() => {
const isChecked = await nightmare const isDisabled = await nightmare
.waitForClassPresent(selectors.clientFiscalData.verifiedDataCheckbox, 'md-checked') .isDisabled(selectors.clientFiscalData.verifiedDataCheckbox);
.evaluate(selector => {
return document.querySelector(selector).getAttribute('disabled');
}, selectors.clientFiscalData.verifiedDataCheckbox);
expect(isChecked).toBeTruthy(); expect(isDisabled).toBeTruthy();
}); });
it('should confirm the form is enabled for salesPerson', async() => { it('should confirm the form is enabled for salesPerson', async() => {

View File

@ -1,11 +1,10 @@
<md-checkbox <div class="check">
aria-label="::$ctrl.label" <div class="focus"></div>
md-indeterminate="$ctrl.isIntermediate" <div class="mark"></div>
ng-disabled="::$ctrl.disabled" </div>
ng-checked="$ctrl.isChecked" <span translate>
ng-model="$ctrl.model"> {{::$ctrl.label}}
<span translate ng-if="::$ctrl.label">{{::$ctrl.label}}</span> </span>
</md-checkbox>
<i class="material-icons" <i class="material-icons"
ng-if="::$ctrl.hasInfo" ng-if="::$ctrl.hasInfo"
vn-tooltip="{{::$ctrl.info}}"> vn-tooltip="{{::$ctrl.info}}">

View File

@ -3,47 +3,71 @@ import Component from '../../lib/component';
import './style.scss'; import './style.scss';
export default class Controller extends Component { export default class Controller extends Component {
constructor($element, $scope, $attrs) { constructor($element, $, $attrs) {
super($element, $scope); super($element, $);
this.hasInfo = Boolean($attrs.info); this.hasInfo = Boolean($attrs.info);
this.info = $attrs.info || null; this.info = $attrs.info || null;
}
get model() { let element = this.element;
return this._model; element.addEventListener('click', e => this.onClick(e));
} element.addEventListener('keydown', e => this.onClick(e));
element.tabIndex = 0;
set model(value) { this.check = element.querySelector('.check');
if (value === null) return;
if (this.model === false && this.tripleState)
value = null;
this.emit('change', {value});
this._model = value;
} }
set field(value) { set field(value) {
if (typeof value === 'number') this._field = value;
value = Boolean(value); let isIndeterminate = Boolean(value == null && this.tripleState);
this.check.classList.toggle('checked', Boolean(value));
this._model = value; this.check.classList.toggle('indeterminate', isIndeterminate);
} }
get field() { get field() {
return this._model; return this._field;
} }
get isIntermediate() { set disabled(value) {
if (this.intermediate || (this.tripleState && (this.model === null || this.model === undefined))) this.element.tabIndex = !value ? 0 : -1;
return true; this.check.classList.toggle('disabled', Boolean(value));
this._disabled = value;
return false;
} }
get isChecked() { get disabled() {
return this.checked || this.model === true; return this._disabled;
}
set tripleState(value) {
this._tripleState = value;
this.field = this.field;
}
get tripleState() {
return this._tripleState;
}
onClick(event) {
event.preventDefault();
if (this.disabled) return;
if (this.tripleState) {
if (this.field == null)
this.field = false;
else if (!this.field)
this.field = true;
else
this.field = null;
} else
this.field = !this.field;
this.$.$applyAsync();
this.element.dispatchEvent(new Event('change'));
}
onKeydown(event) {
if (event.code == 'Space')
this.onClick(event);
} }
} }

View File

@ -1,6 +1,7 @@
describe('Component vnCheck', () => { describe('Component vnCheck', () => {
let controller;
let $element; let $element;
let $ctrl;
let element;
beforeEach(angular.mock.module('vnCore', $translateProvider => { beforeEach(angular.mock.module('vnCore', $translateProvider => {
$translateProvider.translations('en', {}); $translateProvider.translations('en', {});
@ -8,59 +9,56 @@ describe('Component vnCheck', () => {
beforeEach(inject(($compile, $rootScope) => { beforeEach(inject(($compile, $rootScope) => {
$element = $compile(`<vn-check></vn-check`)($rootScope); $element = $compile(`<vn-check></vn-check`)($rootScope);
controller = $element.controller('vnCheck'); $ctrl = $element.controller('vnCheck');
element = $element[0];
})); }));
afterEach(() => { afterEach(() => {
$element.remove(); $element.remove();
}); });
describe('model() setter', () => {
it(`should set model value`, () => {
controller.model = true;
expect(controller.model).toEqual(true);
});
it(`should set model value to null if current model value is false and is a triple-state checkbox`, () => {
controller._model = false;
controller.tripleState = true;
controller.model = true;
expect(controller.model).toEqual(null);
});
});
describe('field() setter', () => { describe('field() setter', () => {
it(`should set model value`, () => { it(`should set model value`, () => {
controller.field = true; $ctrl.field = true;
expect(controller.field).toEqual(true); expect($ctrl.field).toEqual(true);
}); });
it(`should set model value and convert numerical values to boolean values`, () => { it(`should uncheck value and change to true when clicked`, () => {
controller.field = 1; $ctrl.field = false;
element.click();
expect(controller.field).toEqual(true); expect($ctrl.field).toEqual(true);
});
});
describe('isIntermediate() getter', () => {
it(`should return true if intermediate property is truthy`, () => {
controller.intermediate = true;
let result = controller.isIntermediate;
expect(result).toEqual(true);
}); });
it(`should return true if is a triple-state checkbox and has null or undefined value`, () => { it(`should check value and change to false when clicked`, () => {
controller.tripleState = true; $ctrl.field = true;
controller.model = null; element.click();
let result = controller.isIntermediate; expect($ctrl.field).toEqual(false);
});
expect(result).toEqual(true); it(`should check value and change to null when clicked`, () => {
$ctrl.field = true;
$ctrl.tripleState = true;
element.click();
expect($ctrl.field).toEqual(null);
});
it(`should set value to null and change to false when clicked`, () => {
$ctrl.field = null;
$ctrl.tripleState = true;
element.click();
expect($ctrl.field).toEqual(false);
});
it(`should cast value to boolean when clicked`, () => {
$ctrl.field = 0;
element.click();
expect($ctrl.field).toEqual(true);
}); });
}); });
}); });

View File

@ -2,24 +2,77 @@
vn-check { vn-check {
position: relative; position: relative;
cursor: pointer;
display: inline-block;
outline: none;
& > .check {
position: relative;
box-sizing: border-box;
display: inline-block;
vertical-align: middle;
border-radius: 2px;
width: 20px;
height: 20px;
transition: background 250ms;
border: 2px solid #666;
margin: 3px;
margin-right: .4em;
& > .mark {
box-sizing: border-box;
position: absolute;
display: block;
border-width: 0;
}
&.checked {
background-color: $color-main;
border-color: $color-main;
& > .focus {
background-color: rgba($color-main, .15);
}
}
&.checked > .mark {
top: 0;
left: 4px;
transform: rotate(45deg);
width: 7px;
height: 13px;
border: 2px solid $color-font-dark;
border-top: 0;
border-left: 0;
}
&.indeterminate > .mark {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12px;
height: 2px;
border-bottom: 2px solid #666;
}
}
& > .check > .focus {
position: absolute;
top: 50%;
left: 50%;
height: 38px;
width: 38px;
margin-top: -19px;
margin-left: -19px;
border-radius: 50%;
transform: scale3d(0, 0, 0);
transition: background 250ms;
transition: transform 250ms;
background-color: rgba(0, 0, 0, .1);
}
&:focus > .check:not(.disabled) > .focus {
transform: scale3d(1, 1, 1);
}
& > i { & > i {
padding-left: 5px; padding-left: 5px;
position: absolute; position: absolute;
color: $color-font-secondary; color: $color-font-secondary;
font-size: 20px !important; font-size: 20px;
cursor: help
}
md-checkbox.md-checked .md-icon {
background-color: $color-main;
}
md-checkbox {
margin-bottom: 0.8em;
.md-label:empty {
margin: 0
}
} }
} }

View File

@ -13,6 +13,7 @@ vn-icon-button {
color: inherit; color: inherit;
border: 0; border: 0;
padding: 0; padding: 0;
font-size: inherit;
&:hover { &:hover {
background-color: initial; background-color: initial;

View File

@ -7,8 +7,10 @@ import 'angular-translate-loader-partial';
import '@uirouter/angularjs'; import '@uirouter/angularjs';
import 'mg-crud'; import 'mg-crud';
import 'oclazyload'; import 'oclazyload';
/*
import 'angular-material'; import 'angular-material';
import 'angular-material/modules/scss/angular-material.scss'; import 'angular-material/modules/scss/angular-material.scss';
*/
import 'angular-moment'; import 'angular-moment';
export const ngDeps = [ export const ngDeps = [
@ -16,7 +18,7 @@ export const ngDeps = [
'ui.router', 'ui.router',
'mgCrud', 'mgCrud',
'oc.lazyLoad', 'oc.lazyLoad',
'ngMaterial', // 'ngMaterial',
'angularMoment' 'angularMoment'
]; ];

534
front/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,6 @@
"angular": "^1.7.5", "angular": "^1.7.5",
"angular-animate": "^1.7.7", "angular-animate": "^1.7.7",
"angular-aria": "^1.7.7", "angular-aria": "^1.7.7",
"angular-material": "^1.1.12",
"angular-moment": "^1.3.0", "angular-moment": "^1.3.0",
"angular-translate": "^2.18.1", "angular-translate": "^2.18.1",
"angular-translate-loader-partial": "^2.18.1", "angular-translate-loader-partial": "^2.18.1",
@ -24,7 +23,7 @@
"material-design-lite": "^1.3.0", "material-design-lite": "^1.3.0",
"mg-crud": "^1.1.2", "mg-crud": "^1.1.2",
"moment-timezone": "^0.5.25", "moment-timezone": "^0.5.25",
"npm": "^6.9.0", "npm": "^6.11.3",
"oclazyload": "^0.6.3", "oclazyload": "^0.6.3",
"require-yaml": "0.0.1", "require-yaml": "0.0.1",
"validator": "^6.3.0" "validator": "^6.3.0"

View File

@ -1,652 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuites disabled="0" errors="0" failures="0" tests="337" time="6.5">
<testsuite name="loopback model Account" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.023" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="loopback model Account" name="should return true if the user has the given role" time="0.021" />
<testcase classname="loopback model Account" name="should return false if the user doesnt have the given role" time="0.002" />
</testsuite>
<testsuite name="loopback model Company" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.012" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="loopback model Company" name="should check that the company FTH doesnt exists" time="0.012" />
</testsuite>
<testsuite name="account login()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.455" errors="0" tests="0" skipped="0" disabled="0" failures="0">
</testsuite>
<testsuite name="account login().when credentials are correct" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.45" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="account login().when credentials are correct" name="should return the token" time="0.244" />
<testcase classname="account login().when credentials are correct" name="should return the token if the user doesnt exist but the client does" time="0.206" />
</testsuite>
<testsuite name="account login().when credentials are incorrect" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.005" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="account login().when credentials are incorrect" name="should throw a 401 error" time="0.004" />
</testsuite>
<testsuite name="account logout()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.111" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="account logout()" name="should logout and remove token after valid login" time="0.109" />
<testcase classname="account logout()" name="should throw a 401 error when token is invalid" time="0.002" />
<testcase classname="account logout()" name="should throw an error when no token is passed" time="0" />
</testsuite>
<testsuite name="dms downloadFile()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.026" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="dms downloadFile()" name="should return a response for an employee with text content-type" time="0.02" />
<testcase classname="dms downloadFile()" name="should return an error for a user without enough privileges" time="0.006" />
</testsuite>
<testsuite name="dms removeFile()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.007" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="dms removeFile()" name="should return an error for a user without enough privileges" time="0.006" />
</testsuite>
<testsuite name="dms updateFile()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.007" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="dms updateFile()" name="should return an error for a user without enough privileges" time="0.007" />
</testsuite>
<testsuite name="dms uploadFile()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.006" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="dms uploadFile()" name="should return an error for a user without enough privileges" time="0.006" />
</testsuite>
<testsuite name="message send()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.016" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="message send()" name="should return a response containing the same message in params" time="0.016" />
</testsuite>
<testsuite name="userConfig getUserConfig()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.007" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="userConfig getUserConfig()" name="should return the configuration data of a given user" time="0.007" />
</testsuite>
<testsuite name="Model crud()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.053" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="Model crud()" name="should inherit crud method from VnModel" time="0" />
<testcase classname="Model crud()" name="should create a new instance" time="0.027" />
<testcase classname="Model crud()" name="should update the instance" time="0.015" />
<testcase classname="Model crud()" name="should delete the created instance" time="0.011" />
</testsuite>
<testsuite name="Model getSetValues()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.004" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="Model getSetValues()" name="should extend getSetValues properties to any model passed" time="0" />
<testcase classname="Model getSetValues()" name="should return an array of set values from model column sourceApp" time="0.003" />
<testcase classname="Model getSetValues()" name="should return an array of set values from table column source_app" time="0.001" />
</testsuite>
<testsuite name="Model rewriteDbError()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.012" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="Model rewriteDbError()" name="should extend rewriteDbError properties to any model passed" time="0.001" />
<testcase classname="Model rewriteDbError()" name="should handle a duplicated warehouse error" time="0.01" />
</testsuite>
<testsuite name="claimBeginning" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.332" errors="0" tests="0" skipped="0" disabled="0" failures="0">
</testsuite>
<testsuite name="claimBeginning.importToNewRefundTicket()" timestamp="2019-09-30T13:35:07" hostname="localhost" time="0.268" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="claimBeginning.importToNewRefundTicket()" name="should create a new ticket with negative sales and insert the negative sales into claimEnd" time="0.268" />
</testsuite>
<testsuite name="Client createWithInsurance" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.055" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="Client createWithInsurance" name="should verify the classifications and insurances are untainted" time="0.011" />
<testcase classname="Client createWithInsurance" name="should not create the insurance if couldnt create the classification" time="0.007" />
<testcase classname="Client createWithInsurance" name="should create a new client credit classification with insurance" time="0.027" />
</testsuite>
<testsuite name="client hasActiveRecovery" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.008" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="client hasActiveRecovery" name="should return false if the client doesn&apos;t owes" time="0.006" />
<testcase classname="client hasActiveRecovery" name="should return true if the client owes" time="0.001" />
</testsuite>
<testsuite name="IBAN validation" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.002" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="IBAN validation" name="should return false for non-IBAN input" time="0.001" />
<testcase classname="IBAN validation" name="should return false for invalid spanish IBAN input" time="0" />
<testcase classname="IBAN validation" name="should return true for valid spanish IBAN" time="0" />
</testsuite>
<testsuite name="TIN validation" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.006" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="TIN validation" name="should return true for any TIN when no country is passed" time="0" />
</testsuite>
<testsuite name="TIN validation.Spanish" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.002" errors="0" tests="5" skipped="0" disabled="0" failures="0">
<testcase classname="TIN validation.Spanish" name="should return true for valid spanish TIN" time="0" />
<testcase classname="TIN validation.Spanish" name="should return false for spanish TIN with exceeded digits" time="0.001" />
<testcase classname="TIN validation.Spanish" name="should return false for spanish TIN with invalid letter" time="0" />
<testcase classname="TIN validation.Spanish" name="should return true for valid spanish CIF" time="0" />
<testcase classname="TIN validation.Spanish" name="should return false for spanish CIF with invalid letter" time="0.001" />
</testsuite>
<testsuite name="TIN validation.Italian" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.002" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="TIN validation.Italian" name="should return true for valid italian TIN" time="0.001" />
<testcase classname="TIN validation.Italian" name="should return false for italian TIN with exceeded digits" time="0" />
<testcase classname="TIN validation.Italian" name="should return false for italian TIN with bad syntax" time="0.001" />
</testsuite>
<testsuite name="TIN validation.Portuguese" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.001" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="TIN validation.Portuguese" name="should return true for valid portuguese TIN" time="0" />
<testcase classname="TIN validation.Portuguese" name="should return false for portuguese TIN with exceeded digits" time="0" />
<testcase classname="TIN validation.Portuguese" name="should return false for portuguese TIN with bad syntax" time="0" />
</testsuite>
<testsuite name="loopback model address" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.116" errors="0" tests="0" skipped="0" disabled="0" failures="0">
</testsuite>
<testsuite name="loopback model address.observe()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.079" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="loopback model address.observe()" name="should throw an error when deactivating a consignee if its the default address" time="0.005" />
<testcase classname="loopback model address.observe()" name="should set isEqualizated to true of a given Client to trigger any new address to have it" time="0.074" />
</testsuite>
<testsuite name="loopback model Item" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.003" errors="0" tests="0" skipped="0" disabled="0" failures="0">
</testsuite>
<testsuite name="loopback model Item.availableId()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.003" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="loopback model Item.availableId()" name="should return the next available id for an item" time="0.003" />
</testsuite>
<testsuite name="loopback model State" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.003" errors="0" tests="0" skipped="0" disabled="0" failures="0">
</testsuite>
<testsuite name="loopback model State.isAlertLevelZero()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.003" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="loopback model State.isAlertLevelZero()" name="should return true if the alerLevel is 0" time="0.001" />
<testcase classname="loopback model State.isAlertLevelZero()" name="should do nothing if the alertLevel isnt 0" time="0" />
</testsuite>
<testsuite name="ticket model TicketTracking" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.031" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="ticket model TicketTracking" name="should save a ticketTraing as the quantity is greater than 0" time="0.012" />
<testcase classname="ticket model TicketTracking" name="should return an error as the quantity is 0" time="0.005" />
<testcase classname="ticket model TicketTracking" name="should return an error as the quantity isnt a number" time="0.005" />
</testsuite>
<testsuite name="Agency getAgenciesWithWarehouse()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.008" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="Agency getAgenciesWithWarehouse()" name="should return the agencies that can handle the given delivery request" time="0.005" />
<testcase classname="Agency getAgenciesWithWarehouse()" name="should return no agencies if the date is incorrect" time="0.003" />
</testsuite>
<testsuite name="Agency getFirstShipped()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.003" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Agency getFirstShipped()" name="should return the first shipped and landed possible for the filter" time="0.002" />
</testsuite>
<testsuite name="agency getLanded()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.003" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="agency getLanded()" name="should return a landing date" time="0.003" />
</testsuite>
<testsuite name="agency getShipped()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.005" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="agency getShipped()" name="should return a shipment date" time="0.003" />
<testcase classname="agency getShipped()" name="should not return a shipment date" time="0.002" />
</testsuite>
<testsuite name="Agency landsThatDay()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Agency landsThatDay()" name="should return a list of agencies that can land a shipment on a day for an address" time="0.002" />
</testsuite>
<testsuite name="agency clone()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.031" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="agency clone()" name="should clone a zone" time="0.02" />
</testsuite>
<testsuite name="agency editPrices()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.033" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="agency editPrices()" name="should apply price and bonus for a selected day" time="0.008" />
<testcase classname="agency editPrices()" name="should apply price and bonus for all delivery days starting from selected day" time="0.011" />
<testcase classname="agency editPrices()" name="should apply price and bonus for all delivery days" time="0.009" />
</testsuite>
<testsuite name="Claim Create" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.034" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="Claim Create" name="should create a new claim" time="0.013" />
<testcase classname="Claim Create" name="should not be able to create a claim if exists that sale" time="0.007" />
</testsuite>
<testsuite name="claim filter()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.008" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="claim filter()" name="should return 1 result filtering by id" time="0.002" />
<testcase classname="claim filter()" name="should return 1 result filtering by string" time="0.002" />
<testcase classname="claim filter()" name="should return 4 results filtering by worker id" time="0.002" />
</testsuite>
<testsuite name="claim getSummary()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.028" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="claim getSummary()" name="should return summary with claim, salesClaimed, developments and actions defined " time="0.028" />
</testsuite>
<testsuite name="regularizeClaim()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.103" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="regularizeClaim()" name="should change claim state to resolved" time="0.091" />
</testsuite>
<testsuite name="Update Claim" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.038" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="Update Claim" name="should throw an error as the user doesn&apos;t have rights" time="0.008" />
<testcase classname="Update Claim" name="should success to update the claim within privileges " time="0.013" />
<testcase classname="Update Claim" name="should change some sensible fields as salesAssistant" time="0.011" />
</testsuite>
<testsuite name="Update Claim" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.017" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="Update Claim" name="should update the claim isChargedToMana attribute" time="0.005" />
<testcase classname="Update Claim" name="should update the claim responsibility attribute" time="0.006" />
</testsuite>
<testsuite name="TicketDms removeFile()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.01" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="TicketDms removeFile()" name="should return an error for a user without enough privileges" time="0.01" />
</testsuite>
<testsuite name="Claim importTicketSales()" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.01" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Claim importTicketSales()" name="should import sales to a claim actions from an specific ticket" time="0.007" />
</testsuite>
<testsuite name="Address createDefaultAddress" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.047" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="Address createDefaultAddress" name="should verify that client defaultAddressFk is untainted" time="0.002" />
<testcase classname="Address createDefaultAddress" name="should create a new address and set as a client default address" time="0.021" />
</testsuite>
<testsuite name="Client activeWorkersWithRole" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.007" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="Client activeWorkersWithRole" name="should return the sales people as result" time="0.003" />
<testcase classname="Client activeWorkersWithRole" name="should return the buyers as result" time="0.004" />
</testsuite>
<testsuite name="Client addressesPropagateRe" timestamp="2019-09-30T13:35:08" hostname="localhost" time="0.089" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Client addressesPropagateRe" name="should propagate the isEqualizated on both addresses of Mr Wayne and set hasToInvoiceByAddress to false" time="0.064" />
</testsuite>
<testsuite name="Client confirmTransaction" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.068" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Client confirmTransaction" name="should call confirmTransaction() method to mark transaction as confirmed" time="0.045" />
</testsuite>
<testsuite name="Client Create" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.179" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="Client Create" name="should not find Deadpool as he&apos;s not created yet" time="0.005" />
<testcase classname="Client Create" name="should create a new account" time="0.033" />
<testcase classname="Client Create" name="should find an existing account" time="0.002" />
<testcase classname="Client Create" name="should not be able to create a user if exists" time="0.003" />
</testsuite>
<testsuite name="client getAverageInvoiced()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.003" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="client getAverageInvoiced()" name="should call the getAverageInvoiced method" time="0.003" />
</testsuite>
<testsuite name="Client get" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.04" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Client get" name="should receive a formated card of Bruce Wayne" time="0.04" />
</testsuite>
<testsuite name="client getDebt()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.009" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="client getDebt()" name="should return the client debt" time="0.009" />
</testsuite>
<testsuite name="client getMana()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.004" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="client getMana()" name="should call the getMana method" time="0.003" />
</testsuite>
<testsuite name="Client getTransations" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.005" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Client getTransations" name="should call getTransations() method to receive a list of Web Payments from Bruce Wayne" time="0.004" />
</testsuite>
<testsuite name="Client hasCustomerRole" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.007" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="Client hasCustomerRole" name="should call the hasCustomerRole() method with a customer id" time="0.002" />
<testcase classname="Client hasCustomerRole" name="should call the hasCustomerRole() method with a non customer id" time="0.002" />
<testcase classname="Client hasCustomerRole" name="should call the hasCustomerRole() method with an unreal id" time="0.001" />
<testcase classname="Client hasCustomerRole" name="should call the hasCustomerRole() method with an invalid id" time="0.002" />
</testsuite>
<testsuite name="Client isValidClient" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.01" errors="0" tests="6" skipped="0" disabled="0" failures="0">
<testcase classname="Client isValidClient" name="should call the isValidClient() method with a client id and receive true" time="0.002" />
<testcase classname="Client isValidClient" name="should call the isValidClient() method with an employee id to receive false" time="0.002" />
<testcase classname="Client isValidClient" name="should call the isValidClient() method with an unexistant id and receive false" time="0.001" />
<testcase classname="Client isValidClient" name="should call the isValidClient() method with an invalid id and receive false" time="0.001" />
<testcase classname="Client isValidClient" name="should call the isValidClient() method with a customer id which isnt active and return false" time="0.002" />
<testcase classname="Client isValidClient" name="should call the isValidClient() method with a customer id which his data isnt verified and return false" time="0.002" />
</testsuite>
<testsuite name="Client listWorkers" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Client listWorkers" name="should call the listWorkers()" time="0.001" />
</testsuite>
<testsuite name="client summary()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.163" errors="0" tests="7" skipped="0" disabled="0" failures="0">
<testcase classname="client summary()" name="should return a summary object containing data" time="0.026" />
<testcase classname="client summary()" name="should return a summary object containing mana" time="0.021" />
<testcase classname="client summary()" name="should return a summary object containing debt" time="0.023" />
<testcase classname="client summary()" name="should return a summary object containing averageInvoiced" time="0.025" />
<testcase classname="client summary()" name="should return a summary object containing totalGreuge" time="0.021" />
<testcase classname="client summary()" name="should return a summary object without containing active recoveries" time="0.025" />
<testcase classname="client summary()" name="should return a summary object containing active recoveries" time="0.022" />
</testsuite>
<testsuite name="client lastActiveTickets()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="client lastActiveTickets()" name="should return the last three active tickets" time="0.002" />
</testsuite>
<testsuite name="Client updateFiscalData" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.042" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="Client updateFiscalData" name="should return an error if the user is not administrative and the isTaxDataChecked value is true" time="0.002" />
<testcase classname="Client updateFiscalData" name="should return an error if the user is administrative and the isTaxDataChecked value is true BUT the params aint valid" time="0.003" />
<testcase classname="Client updateFiscalData" name="should update the client fiscal data and return the count if changes made" time="0.021" />
</testsuite>
<testsuite name="Client uploadFile()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.008" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Client uploadFile()" name="should return an error for a user without enough privileges" time="0.007" />
</testsuite>
<testsuite name="ClientDms removeFile()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.007" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ClientDms removeFile()" name="should return an error for a user without enough privileges" time="0.007" />
</testsuite>
<testsuite name="Greuge totalGreuge()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.001" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Greuge totalGreuge()" name="should call the sumAmount method" time="0.001" />
</testsuite>
<testsuite name="receipt filter()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.003" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="receipt filter()" name="should return the receipts" time="0.003" />
</testsuite>
<testsuite name="sms send()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.26" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="sms send()" name="should return the expected message and status code" time="0.26" />
</testsuite>
<testsuite name="invoiceOut book()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.093" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="invoiceOut book()" name="should check that invoice out booked is untainted" time="0.002" />
<testcase classname="invoiceOut book()" name="should confirm the book property have been updated" time="0.088" />
</testsuite>
<testsuite name="invoiceOut delete()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.042" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="invoiceOut delete()" name="should check that there is one ticket in the target invoiceOut" time="0.005" />
<testcase classname="invoiceOut delete()" name="should delete the target invoiceOut then check the ticket doesn&apos;t have a refFk anymore" time="0.018" />
</testsuite>
<testsuite name="InvoiceOut download()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.005" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="InvoiceOut download()" name="should return the downloaded fine name" time="0.004" />
</testsuite>
<testsuite name="InvoiceOut filter()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.01" errors="0" tests="8" skipped="3" disabled="0" failures="0">
<testcase classname="InvoiceOut filter()" name="should return the invoice out matching ref" time="0.002" />
<testcase classname="InvoiceOut filter()" name="should return the invoice out matching clientFk" time="0.002" />
<testcase classname="InvoiceOut filter()" name="should return the invoice out matching hasPdf" time="0.001" />
<testcase classname="InvoiceOut filter()" name="should return the invoice out matching amount" time="0.003" />
<testcase classname="InvoiceOut filter()" name="should return the invoice out matching min and max" time="0.002" />
<testcase classname="InvoiceOut filter()" name="should return the invoice out matching issued" time="0">
<skipped message="Temporarily disabled with xit" />
</testcase>
<testcase classname="InvoiceOut filter()" name="should return the invoice out matching created" time="0">
<skipped message="Temporarily disabled with xit" />
</testcase>
<testcase classname="InvoiceOut filter()" name="should return the invoice out matching dued" time="0">
<skipped message="Temporarily disabled with xit" />
</testcase>
</testsuite>
<testsuite name="invoiceOut regenerate()" timestamp="2019-09-30T13:35:09" hostname="localhost" time="0.024" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="invoiceOut regenerate()" name="should check that the invoice has a PDF and is not in print generation queue" time="0.006" />
<testcase classname="invoiceOut regenerate()" name="should mark the invoice as doesn&apos;t have PDF and add it to a print queue" time="0.01" />
</testsuite>
<testsuite name="invoiceOut summary()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.045" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="invoiceOut summary()" name="should return a summary object containing data from one invoiceOut" time="0.012" />
<testcase classname="invoiceOut summary()" name="should return a summary object containing data from it&apos;s tickets" time="0.011" />
<testcase classname="invoiceOut summary()" name="should return a summary object containing it&apos;s supplier country" time="0.012" />
<testcase classname="invoiceOut summary()" name="should return a summary object containing idata from it&apos;s tax types" time="0.009" />
</testsuite>
<testsuite name="item clone()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.118" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="item clone()" name="should clone the given item and it should have the expected id" time="0.115" />
<testcase classname="item clone()" name="should attempt to clone the given item but give an error as it doesnt exist" time="0.003" />
</testsuite>
<testsuite name="item filter()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.009" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="item filter()" name="should return 1 result filtering by id" time="0.003" />
<testcase classname="item filter()" name="should return 1 result filtering by barcode" time="0.003" />
<testcase classname="item filter()" name="should return 2 results using filter and tags" time="0.002" />
</testsuite>
<testsuite name="item getDiary()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.012" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="item getDiary()" name="should check the property balance of the 4 resultant entries" time="0.012" />
</testsuite>
<testsuite name="item getLastEntries()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.008" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="item getLastEntries()" name="should return one entry for a given item" time="0.005" />
<testcase classname="item getLastEntries()" name="should return five entries for a given item" time="0.003" />
</testsuite>
<testsuite name="item getSummary()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.055" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="item getSummary()" name="should return summary with item, tags, botanical, niches, available and visible defined " time="0.055" />
</testsuite>
<testsuite name="item new()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.079" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="item new()" name="should create a new item, adding the name as a tag" time="0.04" />
</testsuite>
<testsuite name="regularize()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.047" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="regularize()" name="should create a new ticket and add a line" time="0.042" />
</testsuite>
<testsuite name="item updateTaxes()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.021" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="item updateTaxes()" name="should throw an error if the taxClassFk is blank" time="0.001" />
<testcase classname="item updateTaxes()" name="should update the tax of a given country of an item" time="0.01" />
<testcase classname="item updateTaxes()" name="should confirm the tax class was updated" time="0.001" />
</testsuite>
<testsuite name="item-barcode toItem()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="item-barcode toItem()" name="should return the same number if there is a barcode and a item with the same ID" time="0.002" />
</testsuite>
<testsuite name="item filterItemTags()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="item filterItemTags()" name="should filter ItemTags table" time="0.002" />
</testsuite>
<testsuite name="order catalogFilter()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.09" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="order catalogFilter()" name="should return an array of items" time="0.05" />
<testcase classname="order catalogFilter()" name="should now return an array of items based on tag filter" time="0.04" />
</testsuite>
<testsuite name="order filter()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.031" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="order filter()" name="should call the filter method with a basic search" time="0.01" />
<testcase classname="order filter()" name="should call the filter method with a single advanced search" time="0.011" />
<testcase classname="order filter()" name="should call the filter method with a complex advanced search" time="0.01" />
</testsuite>
<testsuite name="order getItemTypeAvailable()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.033" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="order getItemTypeAvailable()" name="should call the getItemTypeAvailable method with a valid order and item category" time="0.007" />
<testcase classname="order getItemTypeAvailable()" name="should call the getItemTypeAvailable method with the same order and different item category" time="0.025" />
</testsuite>
<testsuite name="order getTaxes()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.038" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="order getTaxes()" name="should call the getTaxes method and return undefined if its called with a string" time="0.009" />
<testcase classname="order getTaxes()" name="should call the getTaxes method and return undefined if its called with unknown id" time="0.008" />
<testcase classname="order getTaxes()" name="should call the getTaxes method and return the taxes splited if different type of taxes" time="0.016" />
<testcase classname="order getTaxes()" name="should call the getTaxes method and return the taxes for them same type" time="0.004" />
</testsuite>
<testsuite name="order getTotal()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.005" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="order getTotal()" name="should return the order total" time="0.004" />
</testsuite>
<testsuite name="order getTotalVolume()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.001" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="order getTotalVolume()" name="should return the total" time="0.001" />
</testsuite>
<testsuite name="order getVAT()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.006" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="order getVAT()" name="should return the order VAT" time="0.004" />
</testsuite>
<testsuite name="order getVolumes()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="order getVolumes()" name="should return the volumes of a given order id" time="0.002" />
</testsuite>
<testsuite name="order isEditable()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.008" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="order isEditable()" name="should return false when the given order is not editable" time="0.004" />
<testcase classname="order isEditable()" name="should return false when the given order doesnt exists" time="0.001" />
<testcase classname="order isEditable()" name="should return true when the given order is editable" time="0.003" />
</testsuite>
<testsuite name="order new()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.021" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="order new()" name="should throw an error if the client isnt active" time="0.003" />
<testcase classname="order new()" name="should create a new order a user when all conditions are met" time="0.011" />
</testsuite>
<testsuite name="order summary()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.088" errors="0" tests="5" skipped="0" disabled="0" failures="0">
<testcase classname="order summary()" name="should return a summary object containing data from 1 order" time="0.023" />
<testcase classname="order summary()" name="should return a summary object containing sales from 1 order" time="0.018" />
<testcase classname="order summary()" name="should return a summary object containing subTotal for 1 order" time="0.016" />
<testcase classname="order summary()" name="should return a summary object containing VAT for 1 order" time="0.015" />
<testcase classname="order summary()" name="should return a summary object containing total for 1 order" time="0.016" />
</testsuite>
<testsuite name="Order updateBasicData" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.02" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="Order updateBasicData" name="should return an error if the order is confirmed" time="0.003" />
<testcase classname="Order updateBasicData" name="should return an error if the order has rows" time="0.002" />
<testcase classname="Order updateBasicData" name="should return an error if the current user is administrative and the isTaxDataChecked value is true BUT the params aint valid" time="0.002" />
<testcase classname="Order updateBasicData" name="should update the client fiscal data and return the count if changes made" time="0.007" />
</testsuite>
<testsuite name="order addToOrder()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.066" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="order addToOrder()" name="should add a row to a given order" time="0.057" />
</testsuite>
<testsuite name="order removes()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.015" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="order removes()" name="should throw an error if rows property is empty" time="0" />
<testcase classname="order removes()" name="should throw an error if the row selected is not editable" time="0.004" />
<testcase classname="order removes()" name="should delete the row" time="0.006" />
</testsuite>
<testsuite name="Route filter()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.028" errors="0" tests="9" skipped="1" disabled="0" failures="0">
<testcase classname="Route filter()" name="should return the routes matching &quot;search&quot;" time="0.009" />
<testcase classname="Route filter()" name="should return the routes matching &quot;from&quot;" time="0">
<skipped message="Temporarily disabled with xit" />
</testcase>
<testcase classname="Route filter()" name="should return the routes matching &quot;to&quot;" time="0.002" />
<testcase classname="Route filter()" name="should return the routes matching &quot;m3&quot;" time="0.003" />
<testcase classname="Route filter()" name="should return the routes matching &quot;description&quot;" time="0.002" />
<testcase classname="Route filter()" name="should return the routes matching &quot;workerFk&quot;" time="0.002" />
<testcase classname="Route filter()" name="should return the routes matching &quot;warehouseFk&quot;" time="0.004" />
<testcase classname="Route filter()" name="should return the routes matching &quot;vehicleFk&quot;" time="0.003" />
<testcase classname="Route filter()" name="should return the routes matching &quot;agencyModeFk&quot;" time="0.002" />
</testsuite>
<testsuite name="route getTickets()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.023" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="route getTickets()" name="should return the tickets for a given route" time="0.023" />
</testsuite>
<testsuite name="route guessPriority()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.021" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="route guessPriority()" name="should confirm the tickets in the target route have no priority yet" time="0.002" />
<testcase classname="route guessPriority()" name="should call guessPriority() and then check the tickets in the target route now have their priorities defined" time="0.008" />
</testsuite>
<testsuite name="route summary()" timestamp="2019-09-30T13:35:10" hostname="localhost" time="0.103" errors="0" tests="5" skipped="0" disabled="0" failures="0">
<testcase classname="route summary()" name="should return a summary object containing data from one route" time="0.024" />
<testcase classname="route summary()" name="should return a summary object containing it&apos;s agency" time="0.021" />
<testcase classname="route summary()" name="should return a summary object containing it&apos;s vehicle" time="0.02" />
<testcase classname="route summary()" name="should return a summary object containing it&apos;s worker" time="0.021" />
<testcase classname="route summary()" name="should return a summary object containing data from the tickets" time="0.017" />
</testsuite>
<testsuite name="route updateVolume()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.048" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="route updateVolume()" name="should confirm the original volume of the route is the expected" time="0.002" />
<testcase classname="route updateVolume()" name="should confirm the route volume is updated when a ticket is added" time="0.024" />
<testcase classname="route updateVolume()" name="should confirm the change is logged" time="0.002" />
</testsuite>
<testsuite name="ticket listPackaging()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.001" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ticket listPackaging()" name="should call the listPackaging method and return the response" time="0.001" />
</testsuite>
<testsuite name="sale getClaimableFromTicket()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="sale getClaimableFromTicket()" name="should return the claimable sales of a given ticket" time="0.002" />
</testsuite>
<testsuite name="sale removes()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.029" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="sale removes()" name="should throw an error if the ticket of the given sales is not editable" time="0.007" />
<testcase classname="sale removes()" name="should delete the sales" time="0.013" />
</testsuite>
<testsuite name="sale reserve()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.067" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="sale reserve()" name="should throw an error if the ticket can not be modified" time="0.007" />
<testcase classname="sale reserve()" name="should update the given sales of a ticket to reserved" time="0.036" />
</testsuite>
<testsuite name="sale updateConcept()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.019" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="sale updateConcept()" name="should throw if ID was undefined" time="0.001" />
<testcase classname="sale updateConcept()" name="should update the sale concept" time="0.008" />
</testsuite>
<testsuite name="sale updatePrice()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.108" errors="0" tests="5" skipped="0" disabled="0" failures="0">
<testcase classname="sale updatePrice()" name="should throw an error if the ticket is not editable" time="0.015" />
<testcase classname="sale updatePrice()" name="should return 0 if the price is an empty string" time="0.029" />
<testcase classname="sale updatePrice()" name="should now set price as a decimal number in a string" time="0.023" />
<testcase classname="sale updatePrice()" name="should set price as a decimal number and check the sale has the mana component" time="0.022" />
<testcase classname="sale updatePrice()" name="should check that the mana of salesPerson changed" time="0.001" />
</testsuite>
<testsuite name="sale updateQuantity()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.022" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="sale updateQuantity()" name="should throw an error if the quantity is not a number" time="0.001" />
<testcase classname="sale updateQuantity()" name="should throw an error if the quantity is greater than it should be" time="0.001" />
<testcase classname="sale updateQuantity()" name="should update the quantity of a given sale current line" time="0.02" />
</testsuite>
<testsuite name="ticket listSaleTracking()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.009" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="ticket listSaleTracking()" name="should call the listSaleTracking method and return the response" time="0.005" />
<testcase classname="ticket listSaleTracking()" name="should call the listSaleTracking method and return zero if doesn&apos;t have lines" time="0.004" />
</testsuite>
<testsuite name="ticket editableStates()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.012" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="ticket editableStates()" name="should return the expected state for the given role" time="0.003" />
<testcase classname="ticket editableStates()" name="should returns the expected states by a specific role" time="0.003" />
<testcase classname="ticket editableStates()" name="should return again the expected state by a specific role" time="0.005" />
</testsuite>
<testsuite name="state isEditable()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.018" errors="0" tests="5" skipped="0" disabled="0" failures="0">
<testcase classname="state isEditable()" name="should return false if the given state is not editable by a specific role" time="0.003" />
<testcase classname="state isEditable()" name="should return true if the given state is editable by a specific role" time="0.003" />
<testcase classname="state isEditable()" name="should return true again if the given state is editable by a specific role" time="0.004" />
<testcase classname="state isEditable()" name="should return false if the given state is not editable for the given role" time="0.003" />
<testcase classname="state isEditable()" name="should return true if the given state is editable for the given role" time="0.004" />
</testsuite>
<testsuite name="ticket addSale()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.099" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="ticket addSale()" name="should create a new sale for the ticket with id 13" time="0.072" />
<testcase classname="ticket addSale()" name="should not be able to add a sale if the item quantity is not available" time="0.011" />
<testcase classname="ticket addSale()" name="should not be able to add a sale if the ticket is not editable" time="0.007" />
</testsuite>
<testsuite name="ticket canHaveStowaway()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.004" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="ticket canHaveStowaway()" name="should return true if the ticket warehouse have hasStowaway equal 1" time="0.003" />
<testcase classname="ticket canHaveStowaway()" name="should return false if the ticket warehouse dont have hasStowaway equal 0" time="0.001" />
</testsuite>
<testsuite name="ticket componentUpdate()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.101" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="ticket componentUpdate()" name="should change the agencyMode to modify the sale components value" time="0.048" />
<testcase classname="ticket componentUpdate()" name="should change the agencyMode to go back to the originals sale components value" time="0.05" />
</testsuite>
<testsuite name="ticket filter()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.042" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ticket filter()" name="should return the tickets matching the filter" time="0.042" />
</testsuite>
<testsuite name="ticket getPossibleStowaways()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.018" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="ticket getPossibleStowaways()" name="should throw an error if Can&apos;t create stowaway for this ticket" time="0.004" />
<testcase classname="ticket getPossibleStowaways()" name="should return an empty list of tickets for a valid ticket" time="0.004" />
<testcase classname="ticket getPossibleStowaways()" name="should return allowed list of tickets for a valid ticket" time="0.01" />
</testsuite>
<testsuite name="ticket getSales()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.006" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ticket getSales()" name="should return the sales of a ticket" time="0.006" />
</testsuite>
<testsuite name="ticket getSalesPersonMana()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.007" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="ticket getSalesPersonMana()" name="should get the mana of a salesperson of a given ticket" time="0.006" />
<testcase classname="ticket getSalesPersonMana()" name="should return 0 if the given ticket does not exist" time="0.001" />
</testsuite>
<testsuite name="ticket getTaxes()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.007" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ticket getTaxes()" name="should return the tax of a given ticket" time="0.006" />
</testsuite>
<testsuite name="ticket getTotal()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.012" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="ticket getTotal()" name="should return the total of a ticket" time="0.006" />
<testcase classname="ticket getTotal()" name="should return zero if the ticket doesn&apos;t have lines" time="0.005" />
</testsuite>
<testsuite name="ticket getTotalVolume()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ticket getTotalVolume()" name="should return the total volume of a ticket" time="0.002" />
</testsuite>
<testsuite name="ticket getVAT()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.006" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ticket getVAT()" name="should return the ticket VAT" time="0.006" />
</testsuite>
<testsuite name="ticket getVolume()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.001" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ticket getVolume()" name="should call the getVolume method" time="0.001" />
</testsuite>
<testsuite name="ticket isEditable()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.043" errors="0" tests="7" skipped="0" disabled="0" failures="0">
<testcase classname="ticket isEditable()" name="should return false if the given ticket is not editable" time="0.009" />
<testcase classname="ticket isEditable()" name="should return false if the given ticket does not exist" time="0.005" />
<testcase classname="ticket isEditable()" name="should return false if the given ticket isDeleted" time="0.005" />
<testcase classname="ticket isEditable()" name="should return true if the given ticket is editable" time="0.007" />
<testcase classname="ticket isEditable()" name="should be able to edit a deleted or invoiced ticket if the role is salesAssistant" time="0.005" />
<testcase classname="ticket isEditable()" name="should be able to edit a deleted or invoiced ticket if the role is productionBoss" time="0.007" />
<testcase classname="ticket isEditable()" name="should not be able to edit a deleted or invoiced ticket if the role is salesPerson" time="0.005" />
</testsuite>
<testsuite name="ticket isEmpty()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.016" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="ticket isEmpty()" name="should return false if the ticket contains any packages" time="0.004" />
<testcase classname="ticket isEmpty()" name="should return false if the ticket contains any services" time="0.003" />
<testcase classname="ticket isEmpty()" name="should return false if the ticket contains any purchase request" time="0.004" />
<testcase classname="ticket isEmpty()" name="should return false if the ticket contains any sale" time="0.005" />
</testsuite>
<testsuite name="ticket makeInvoice()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.12" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="ticket makeInvoice()" name="should invoice a ticket" time="0.084" />
<testcase classname="ticket makeInvoice()" name="should not invoice an already invoiced ticket" time="0.012" />
</testsuite>
<testsuite name="ticket new()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.023" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="ticket new()" name="should throw an error if the client isnt frozen and isnt active" time="0.004" />
<testcase classname="ticket new()" name="should throw an error if the address doesnt exist" time="0.001" />
<testcase classname="ticket new()" name="should return the id of the created ticket" time="0.011" />
</testsuite>
<testsuite name="sale priceDifference()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.055" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="sale priceDifference()" name="should return ticket price differences" time="0.048" />
<testcase classname="sale priceDifference()" name="should return an error if the ticket is not editable" time="0.007" />
</testsuite>
<testsuite name="ticket deleted()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.036" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="ticket deleted()" name="should make sure the ticket is not deleted yet" time="0.001" />
<testcase classname="ticket deleted()" name="should set a ticket to deleted" time="0.012" />
<testcase classname="ticket deleted()" name="should throw an error if the given ticket has a claim" time="0.002" />
</testsuite>
<testsuite name="ticket subtotal()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.005" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="ticket subtotal()" name="should return the subtotal of a ticket" time="0.003" />
<testcase classname="ticket subtotal()" name="should return 0 if the ticket doesn&apos;t have lines" time="0.002" />
</testsuite>
<testsuite name="ticket summary()" timestamp="2019-09-30T13:35:11" hostname="localhost" time="0.144" errors="0" tests="5" skipped="0" disabled="0" failures="0">
<testcase classname="ticket summary()" name="should return a summary object containing data from 1 ticket" time="0.029" />
<testcase classname="ticket summary()" name="should return a summary object containing sales from 1 ticket" time="0.028" />
<testcase classname="ticket summary()" name="should return a summary object containing subtotal for 1 ticket" time="0.033" />
<testcase classname="ticket summary()" name="should return a summary object containing VAT for 1 ticket" time="0.03" />
<testcase classname="ticket summary()" name="should return a summary object containing total for 1 ticket" time="0.024" />
</testsuite>
<testsuite name="sale transferSales()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.209" errors="0" tests="5" skipped="0" disabled="0" failures="0">
<testcase classname="sale transferSales()" name="should throw an error as the ticket is not editable" time="0.005" />
<testcase classname="sale transferSales()" name="should throw an error if the receiving ticket is not editable" time="0.01" />
<testcase classname="sale transferSales()" name="should throw an error when attempting to create a new ticket without delivery dates" time="0.009" />
<testcase classname="sale transferSales()" name="should transfer the sales from one ticket to a new one" time="0.046" />
<testcase classname="sale transferSales()" name="should transfer back the sales and set the created ticket as deleted" time="0.054" />
</testsuite>
<testsuite name="sale transferSales().sale transferPartialSales()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.082" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="sale transferSales().sale transferPartialSales()" name="should throw an error in the quantity to transfer exceeds the amount from the original sale" time="0.029" />
<testcase classname="sale transferSales().sale transferPartialSales()" name="should partially transfer the sales from one ticket to a new one" time="0.053" />
</testsuite>
<testsuite name="sale updateDiscount()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.054" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="sale updateDiscount()" name="should throw an error if no sales were selected" time="0.002" />
<testcase classname="sale updateDiscount()" name="should throw an error if no sales belong to different tickets" time="0.003" />
<testcase classname="sale updateDiscount()" name="should throw an error if the ticket is invoiced already" time="0.009" />
<testcase classname="sale updateDiscount()" name="should update the discount if the salesPerson has mana" time="0.021" />
</testsuite>
<testsuite name="ticket updateEditableTicket()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.04" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="ticket updateEditableTicket()" name="should now throw an error if the ticket is not editable" time="0.008" />
<testcase classname="ticket updateEditableTicket()" name="should edit the ticket address" time="0.017" />
</testsuite>
<testsuite name="Ticket uploadFile()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.007" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="Ticket uploadFile()" name="should return an error for a user without enough privileges" time="0.007" />
</testsuite>
<testsuite name="TicketDms removeFile()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.01" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="TicketDms removeFile()" name="should return an error for a user without enough privileges" time="0.01" />
</testsuite>
<testsuite name="ticket-request confirm()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.143" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="ticket-request confirm()" name="should throw an error if the item doesn&apos;t exist" time="0.004" />
<testcase classname="ticket-request confirm()" name="should throw an error if the item is not available" time="0.01" />
<testcase classname="ticket-request confirm()" name="should update the sale details if the request already contains a sale id" time="0.06" />
<testcase classname="ticket-request confirm()" name="should create a new sale for the the request if there&apos;s no sale id" time="0.051" />
</testsuite>
<testsuite name="ticket-request deny()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.024" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="ticket-request deny()" name="should return all ticket requests" time="0.016" />
</testsuite>
<testsuite name="ticket-request filter()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.03" errors="0" tests="9" skipped="0" disabled="0" failures="0">
<testcase classname="ticket-request filter()" name="should return all ticket requests" time="0.004" />
<testcase classname="ticket-request filter()" name="should return the ticket request matching a generic search value which is the ticket ID" time="0.003" />
<testcase classname="ticket-request filter()" name="should return the ticket request matching a generic search value which is the client address alias" time="0.004" />
<testcase classname="ticket-request filter()" name="should return the ticket request matching the ticket ID" time="0.003" />
<testcase classname="ticket-request filter()" name="should return the ticket request matching the atender ID" time="0.003" />
<testcase classname="ticket-request filter()" name="should return the ticket request matching the isOk triple-state" time="0.003" />
<testcase classname="ticket-request filter()" name="should return the ticket request matching the client ID" time="0.004" />
<testcase classname="ticket-request filter()" name="should return the ticket request matching the warehouse ID" time="0.003" />
<testcase classname="ticket-request filter()" name="should return the ticket request matching the salesPerson ID" time="0.003" />
</testsuite>
<testsuite name="ticket changeState()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.084" errors="0" tests="5" skipped="0" disabled="0" failures="0">
<testcase classname="ticket changeState()" name="should throw if the ticket is not editable and the user isnt production" time="0.007" />
<testcase classname="ticket changeState()" name="should throw an error if a worker with employee role attemps to a forbidden state" time="0.007" />
<testcase classname="ticket changeState()" name="should be able to create a ticket tracking line for a not editable ticket if the user has the production role" time="0.016" />
<testcase classname="ticket changeState()" name="should return an array with the created ticket tracking line" time="0.017" />
<testcase classname="ticket changeState()" name="should return an array with the created ticket tracking line when the user is salesperson, uses the state assigned and thes a workerFk given" time="0.017" />
</testsuite>
<testsuite name="device checkUuid()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.005" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="device checkUuid()" name="should return an state equal to false" time="0.005" />
</testsuite>
<testsuite name="worker filter()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.031" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="worker filter()" name="should return 1 result filtering by id" time="0.021" />
<testcase classname="worker filter()" name="should return 1 result filtering by string" time="0.008" />
<testcase classname="worker filter()" name="should return 2 results filtering by name" time="0.002" />
</testsuite>
<testsuite name="worker isSubordinate()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.012" errors="0" tests="3" skipped="0" disabled="0" failures="0">
<testcase classname="worker isSubordinate()" name="should return truthy if a worker is a subordinate" time="0.004" />
<testcase classname="worker isSubordinate()" name="should return truthy for an hr person" time="0.004" />
<testcase classname="worker isSubordinate()" name="should return truthy if the current user is himself" time="0.004" />
</testsuite>
<testsuite name="worker mySubordinates()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.011" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="worker mySubordinates()" name="should return an array of subordinates greather than 1" time="0.007" />
<testcase classname="worker mySubordinates()" name="should return an array of one subordinate" time="0.003" />
</testsuite>
<testsuite name="Worker absences()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.082" errors="0" tests="4" skipped="0" disabled="0" failures="0">
<testcase classname="Worker absences()" name="should get the absence calendar for the given dates then evaluate the type of absences" time="0.029" />
<testcase classname="Worker absences()" name="should fire the worker 106 on Juny and see he/she has 14" time="0.017" />
<testcase classname="Worker absences()" name="should fire the worker 106 on March and see he/she has 7" time="0.017" />
<testcase classname="Worker absences()" name="should fire the worker 106 on january and see he/she has x" time="0.015" />
</testsuite>
<testsuite name="workerMana getCurrentWorkerMana()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.006" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="workerMana getCurrentWorkerMana()" name="should get the mana of the logged worker" time="0.003" />
<testcase classname="workerMana getCurrentWorkerMana()" name="should return 0 if the user doesnt uses mana" time="0.002" />
</testsuite>
<testsuite name="workerTimeControl addAutoTime()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.005" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="workerTimeControl addAutoTime()" name="should return an undefined value" time="0.005" />
</testsuite>
<testsuite name="workerTimeControl filter()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.011" errors="0" tests="2" skipped="0" disabled="0" failures="0">
<testcase classname="workerTimeControl filter()" name="should return 1 result filtering by id" time="0.005" />
<testcase classname="workerTimeControl filter()" name="should return a privilege error for a non subordinate worker" time="0.006" />
</testsuite>
<testsuite name="workerTimeControl getHoursWorked()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="workerTimeControl getHoursWorked()" name="should return an totalWorkedYear to be defined" time="0.002" />
</testsuite>
<testsuite name="workerTimeControl getWorkedWeek()" timestamp="2019-09-30T13:35:12" hostname="localhost" time="0.002" errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="workerTimeControl getWorkedWeek()" name="should return an timeds to be defined" time="0.002" />
</testsuite>
</testsuites>

View File

@ -41,7 +41,7 @@ describe('Claim', () => {
$httpBackend.flush(); $httpBackend.flush();
expect(controller.$.model.remove).toHaveBeenCalledWith(dmsIndex); expect(controller.$.model.remove).toHaveBeenCalledWith(dmsIndex);
expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Photo deleted!'); expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Photo deleted');
}); });
}); });

View File

@ -10,5 +10,3 @@ import './development';
import './search-panel'; import './search-panel';
import './summary'; import './summary';
import './dms/index'; import './dms/index';
import './dms/create';
import './dms/edit';

View File

@ -236,7 +236,6 @@ class Controller {
addTime(response) { addTime(response) {
if (response === 'ACCEPT') { if (response === 'ACCEPT') {
console.log('newTime', this.newTime);
let data = {workerFk: this.worker.id, timed: this.newTime}; let data = {workerFk: this.worker.id, timed: this.newTime};
let query = `/api/WorkerTimeControls/addTime`; let query = `/api/WorkerTimeControls/addTime`;
this.$http.post(query, data).then(() => { this.$http.post(query, data).then(() => {