Merge branch 'dev' of https://git.verdnatura.es/salix into dev
This commit is contained in:
commit
5486413a0a
|
@ -14,7 +14,7 @@ export const validators = {
|
||||||
min: conf.min || conf.is,
|
min: conf.min || conf.is,
|
||||||
max: conf.max || conf.is
|
max: conf.max || conf.is
|
||||||
};
|
};
|
||||||
let val = String(value);
|
let val = value ? String(value) : '';
|
||||||
if (!validator.isLength(val, options)) {
|
if (!validator.isLength(val, options)) {
|
||||||
if (conf.is) {
|
if (conf.is) {
|
||||||
throw new Error(`Value should be ${conf.is} characters long`);
|
throw new Error(`Value should be ${conf.is} characters long`);
|
||||||
|
|
|
@ -129,6 +129,9 @@ export default {
|
||||||
greugeButton: `${components.vnMenuItem}[ui-sref="clientCard.greuge.list"]`,
|
greugeButton: `${components.vnMenuItem}[ui-sref="clientCard.greuge.list"]`,
|
||||||
addGreugeFloatButton: `${components.vnFloatButton}`,
|
addGreugeFloatButton: `${components.vnFloatButton}`,
|
||||||
amountInput: `${components.vnTextfield}[name="Amount"]`,
|
amountInput: `${components.vnTextfield}[name="Amount"]`,
|
||||||
|
descriptionInput: `${components.vnTextfield}[name="Description"]`,
|
||||||
|
typeInput: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||||
|
typeSecondOption: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] > vn-vertical > vn-drop-down > vn-vertical > vn-auto:nth-child(2) > ul > li`,
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`
|
||||||
// firstGreugeText: ''
|
// firstGreugeText: ''
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ const moduleAccessViewHashURL = '#!/';
|
||||||
|
|
||||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
|
||||||
|
|
||||||
fdescribe('Add greuge path', () => {
|
describe('Add greuge path', () => {
|
||||||
describe('warm up', () => {
|
describe('warm up', () => {
|
||||||
it('should warm up login and fixtures', done => {
|
it('should warm up login and fixtures', done => {
|
||||||
nightmare
|
nightmare
|
||||||
|
@ -96,7 +96,19 @@ fdescribe('Add greuge path', () => {
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should add a new greuge`, done => {
|
it(`should receive an error if all fields are empty but date on submit`, done => {
|
||||||
|
nightmare
|
||||||
|
.click(selectors.credit.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toContain('Error');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should receive an error if all fields are empty but date and amount on submit`, done => {
|
||||||
nightmare
|
nightmare
|
||||||
.type(selectors.greuge.amountInput, 999)
|
.type(selectors.greuge.amountInput, 999)
|
||||||
.click(selectors.credit.saveButton)
|
.click(selectors.credit.saveButton)
|
||||||
|
@ -109,15 +121,32 @@ fdescribe('Add greuge path', () => {
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('should confirm the credit was updated', done => {
|
it(`should receive an error if all fields are empty but date and amount on submit`, done => {
|
||||||
// nightmare
|
nightmare
|
||||||
// .waitForSnackbarReset()
|
.clearInput(selectors.greuge.amountInput)
|
||||||
// .wait(selectors.credit.firstCreditText)
|
.type(selectors.greuge.descriptionInput, 'Bat-flying suite with anti-APCR rounds')
|
||||||
// .getInnerText(selectors.credit.firstCreditText)
|
.click(selectors.credit.saveButton)
|
||||||
// .then(value => {
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
// expect(value).toContain(999);
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
// done();
|
.then(result => {
|
||||||
// })
|
expect(result).toContain('Error');
|
||||||
// .catch(catchErrors(done));
|
done();
|
||||||
// });
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should receive an error if all fields are empty but date and type on submit`, done => {
|
||||||
|
nightmare
|
||||||
|
.clearInput(selectors.greuge.descriptionInput)
|
||||||
|
.waitToClick(selectors.greuge.typeInput)
|
||||||
|
.waitToClick(selectors.greuge.typeSecondOption)
|
||||||
|
.click(selectors.credit.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toContain('Error');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -188,7 +188,7 @@ gulp.task('waitForMySQL', callback => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log('MySQL connection not established whithin 15 secs!');
|
console.log(`MySQL connection not established whithin ${maxInterval / 1000} secs!`);
|
||||||
clearInterval(waitForLocaldb);
|
clearInterval(waitForLocaldb);
|
||||||
}
|
}
|
||||||
}, interval);
|
}, interval);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
FROM mysql:5.6.37
|
FROM mysql:5.6.37
|
||||||
|
|
||||||
ENV MYSQL_ALLOW_EMPTY_PASSWORD yes
|
ENV MYSQL_ALLOW_EMPTY_PASSWORD yes
|
||||||
|
ENV TZ GMT-1
|
||||||
|
|
||||||
COPY localDB01StructureAccount.sql /docker-entrypoint-initdb.d
|
COPY localDB01StructureAccount.sql /docker-entrypoint-initdb.d
|
||||||
COPY localDB02StructureVn2008.sql /docker-entrypoint-initdb.d
|
COPY localDB02StructureVn2008.sql /docker-entrypoint-initdb.d
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
module.exports = function(Self) {
|
module.exports = function(Self) {
|
||||||
require('../methods/ticket-state/change-state.js')(Self);
|
require('../methods/ticket-state/change-state.js')(Self);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue