Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2488-jasmine_true_random
This commit is contained in:
commit
984a91d544
|
@ -72,7 +72,7 @@ pipeline {
|
||||||
/* stage('Backend') {
|
/* stage('Backend') {
|
||||||
steps {
|
steps {
|
||||||
nodejs('node-lts') {
|
nodejs('node-lts') {
|
||||||
sh 'gulp backTestOnce --ci'
|
sh 'gulp launchBackTest --ci'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} */
|
} */
|
||||||
|
|
12
gulpfile.js
12
gulpfile.js
|
@ -67,9 +67,9 @@ back.description = `Starts backend and database service`;
|
||||||
const defaultTask = gulp.parallel(front, back);
|
const defaultTask = gulp.parallel(front, back);
|
||||||
defaultTask.description = `Starts all application services`;
|
defaultTask.description = `Starts all application services`;
|
||||||
|
|
||||||
// Backend tests
|
// Backend tests - Private method
|
||||||
|
|
||||||
async function backTestOnce(done) {
|
async function launchBackTest(done) {
|
||||||
let err;
|
let err;
|
||||||
let dataSources = require('./loopback/server/datasources.json');
|
let dataSources = require('./loopback/server/datasources.json');
|
||||||
|
|
||||||
|
@ -124,14 +124,16 @@ async function backTestOnce(done) {
|
||||||
if (err)
|
if (err)
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
backTestOnce.description = `Runs the backend tests once using a random container, can receive --ci arg to save reports on a xml file`;
|
launchBackTest.description = `Runs the backend tests once using a random container, can receive --ci arg to save reports on a xml file`;
|
||||||
|
|
||||||
|
// Backend tests
|
||||||
|
|
||||||
function backTest(done) {
|
function backTest(done) {
|
||||||
const nodemon = require('gulp-nodemon');
|
const nodemon = require('gulp-nodemon');
|
||||||
|
|
||||||
nodemon({
|
nodemon({
|
||||||
exec: ['node --tls-min-v1.0 ./node_modules/gulp/bin/gulp.js'],
|
exec: ['node --tls-min-v1.0 ./node_modules/gulp/bin/gulp.js'],
|
||||||
args: ['backTestOnce'],
|
args: ['launchBackTest'],
|
||||||
watch: backSources,
|
watch: backSources,
|
||||||
done: done
|
done: done
|
||||||
});
|
});
|
||||||
|
@ -402,7 +404,7 @@ module.exports = {
|
||||||
backOnly,
|
backOnly,
|
||||||
backWatch,
|
backWatch,
|
||||||
backTest,
|
backTest,
|
||||||
backTestOnce,
|
launchBackTest,
|
||||||
e2e,
|
e2e,
|
||||||
i,
|
i,
|
||||||
install,
|
install,
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
|
<mg-ajax path="Entries/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
||||||
<vn-watcher
|
<vn-watcher
|
||||||
vn-id="watcher"
|
vn-id="watcher"
|
||||||
url="Entries"
|
|
||||||
id-field="id"
|
|
||||||
data="$ctrl.entry"
|
data="$ctrl.entry"
|
||||||
params="$ctrl.entry"
|
form="form"
|
||||||
save="patch"
|
save="patch">
|
||||||
form="form">
|
|
||||||
</vn-watcher>
|
</vn-watcher>
|
||||||
<form name="form" ng-submit="watcher.submit()" class="vn-w-md">
|
<form name="form" ng-submit="watcher.submit()" class="vn-w-md">
|
||||||
<vn-card class="vn-pa-lg">
|
<vn-card class="vn-pa-lg">
|
||||||
|
|
|
@ -386,7 +386,7 @@ class Controller extends Section {
|
||||||
* Updates the sale quantity for existing instance
|
* Updates the sale quantity for existing instance
|
||||||
*/
|
*/
|
||||||
changeQuantity(sale) {
|
changeQuantity(sale) {
|
||||||
if (!sale.itemFk || !sale.quantity) return;
|
if (!sale.itemFk || sale.quantity == null) return;
|
||||||
|
|
||||||
if (!sale.id)
|
if (!sale.id)
|
||||||
return this.addSale(sale);
|
return this.addSale(sale);
|
||||||
|
|
Loading…
Reference in New Issue