From 69f8687ab31bf536e5bc2704362984584d969a89 Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 7 Oct 2020 11:43:13 +0200 Subject: [PATCH 1/2] 2471 - Renamed method backTestOnce to launchBackTest --- Jenkinsfile | 2 +- gulpfile.js | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d07b478090..e5f668581a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -72,7 +72,7 @@ pipeline { /* stage('Backend') { steps { nodejs('node-lts') { - sh 'gulp backTestOnce --ci' + sh 'gulp launchBackTest --ci' } } } */ diff --git a/gulpfile.js b/gulpfile.js index 40590d7c27..39dbef71d2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -67,9 +67,9 @@ back.description = `Starts backend and database service`; const defaultTask = gulp.parallel(front, back); defaultTask.description = `Starts all application services`; -// Backend tests +// Backend tests - Private method -async function backTestOnce(done) { +async function launchBackTest(done) { let err; let dataSources = require('./loopback/server/datasources.json'); @@ -126,14 +126,16 @@ async function backTestOnce(done) { if (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) { const nodemon = require('gulp-nodemon'); nodemon({ exec: ['node --tls-min-v1.0 ./node_modules/gulp/bin/gulp.js'], - args: ['backTestOnce'], + args: ['launchBackTest'], watch: backSources, done: done }); @@ -404,7 +406,7 @@ module.exports = { backOnly, backWatch, backTest, - backTestOnce, + launchBackTest, e2e, i, install, From 3f8a67578592f15a43d69e6749869ef66e8e2caf Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 13 Oct 2020 08:42:13 +0200 Subject: [PATCH 2/2] 2499 - Allow zero quantity --- modules/entry/front/basic-data/index.html | 8 +++----- modules/ticket/front/sale/index.js | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/entry/front/basic-data/index.html b/modules/entry/front/basic-data/index.html index f3adc6b024..475afdfd4e 100644 --- a/modules/entry/front/basic-data/index.html +++ b/modules/entry/front/basic-data/index.html @@ -1,11 +1,9 @@ + + form="form" + save="patch">
diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 48f33454cf..e022e2351c 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -386,7 +386,7 @@ class Controller extends Section { * Updates the sale quantity for existing instance */ changeQuantity(sale) { - if (!sale.itemFk || !sale.quantity) return; + if (!sale.itemFk || sale.quantity == null) return; if (!sale.id) return this.addSale(sale);