Bug fixes

This commit is contained in:
Juan Ferrer Toribio 2018-02-01 12:52:58 +01:00
parent b5e5b5bd6b
commit 57479aaf76
8 changed files with 74395 additions and 73845 deletions

View File

@ -133,6 +133,7 @@ describe('Edit pay method path', () => {
it(`should add the IBAN`, done => { it(`should add the IBAN`, done => {
nightmare nightmare
.clearInput(selectors.payMethod.IBANInput)
.type(selectors.payMethod.IBANInput, 'ES91 2100 0418 4502 0005 1332') .type(selectors.payMethod.IBANInput, 'ES91 2100 0418 4502 0005 1332')
.waitToClick(selectors.payMethod.saveButton) .waitToClick(selectors.payMethod.saveButton)
.waitToClick(selectors.payMethod.cancelNotificationButton) .waitToClick(selectors.payMethod.cancelNotificationButton)

View File

@ -250,8 +250,8 @@ describe('Edit addresses path', () => {
nightmare nightmare
.waitForSnackbarReset() .waitForSnackbarReset()
.waitToClick(selectors.addresses.addressesButton) .waitToClick(selectors.addresses.addressesButton)
.wait(selectors.addresses.isDefaultAddress) .wait(selectors.addresses.defaultAddress)
.getInnerText(selectors.addresses.isDefaultAddress) .getInnerText(selectors.addresses.defaultAddress)
.then(result => { .then(result => {
expect(result).toContain('320 Park Avenue New York'); expect(result).toContain('320 Park Avenue New York');
done(); done();
@ -263,8 +263,8 @@ describe('Edit addresses path', () => {
nightmare nightmare
.waitForSnackbarReset() .waitForSnackbarReset()
.waitToClick(selectors.addresses.secondMakeDefaultStar) .waitToClick(selectors.addresses.secondMakeDefaultStar)
.waitForTextInElement(selectors.addresses.isDefaultAddress, 'Somewhere in Thailand') .waitForTextInElement(selectors.addresses.defaultAddress, 'Somewhere in Thailand')
.getInnerText(selectors.addresses.isDefaultAddress) .getInnerText(selectors.addresses.defaultAddress)
.then(result => { .then(result => {
expect(result).toContain('Somewhere in Thailand'); expect(result).toContain('Somewhere in Thailand');
done(); done();
@ -274,7 +274,7 @@ describe('Edit addresses path', () => {
it(`should click on the edit icon of the default address`, done => { it(`should click on the edit icon of the default address`, done => {
nightmare nightmare
.waitForTextInElement(selectors.addresses.isDefaultAddress, 'Somewhere in Thailand') .waitForTextInElement(selectors.addresses.defaultAddress, 'Somewhere in Thailand')
.waitToClick(selectors.addresses.firstEditButton) .waitToClick(selectors.addresses.firstEditButton)
.waitForURL('/edit') .waitForURL('/edit')
.url() .url()

View File

@ -40,15 +40,15 @@ gulp.task('services', callback => {
exec(command, (err, stdout, stderr) => { exec(command, (err, stdout, stderr) => {
let isNotRunning = !stdout.includes('running'); let isNotRunning = !stdout.includes('running');
if (isNotRunning) { if (isNotRunning) {
runSequence('docker', 'waitForMySQL', 'run-services'); runSequence('docker-wait', 'services-run', callback);
} else { } else {
runSequence('run-services'); runSequence('services-run', callback);
} }
callback(err); callback(err);
}); });
}); });
gulp.task('run-services', ['nginx'], () => { gulp.task('services-run', ['nginx'], () => {
const servicesPath = './services/'; const servicesPath = './services/';
const services = fs.readdirSync(servicesPath); const services = fs.readdirSync(servicesPath);
services.splice(services.indexOf('loopback'), 1); services.splice(services.indexOf('loopback'), 1);
@ -63,11 +63,11 @@ gulp.task('test', callback => {
return require('./services_tests').start(); return require('./services_tests').start();
}); });
gulp.task('e2e', callback => { gulp.task('e2e', ['docker-wait'], callback => {
runSequence('docker', 'waitForMySQL', 'run-e2e', callback); return gulp.start('e2e-run');
}); });
gulp.task('run-e2e', callback => { gulp.task('e2e-run', callback => {
gulp.src('./e2e_tests.js') gulp.src('./e2e_tests.js')
.pipe(jasmine({reporter: 'none'})); .pipe(jasmine({reporter: 'none'}));
}); });
@ -190,37 +190,11 @@ gulp.task('watch', function() {
// E2E tests // E2E tests
gulp.task('docker', callback => { gulp.task('docker', callback => {
runSequence('deleteDockerDb', 'deleteDockerImageDb', 'buildDockerDb', 'runDockerDb', callback); runSequence('docker-delete', 'docker-delete-image', 'docker-build', 'docker-run', callback);
}); });
gulp.task('runDockerDb', callback => { gulp.task('docker-wait', ['docker'], callback => {
exec('docker run -d --name dblocal -p 3306:3306 dblocal', (err, stdout, stderr) => { let maxInterval = 30 * 60000;
setTimeout(() => {
callback(err);
}, 15000);
});
});
gulp.task('buildDockerDb', callback => {
exec('docker build -t dblocal:latest ./services/db', (err, stdout, stderr) => {
callback(err);
});
});
gulp.task('deleteDockerImageDb', callback => {
exec('docker rmi dblocal:latest', (err, stdout, stderr) => {
callback(err = null);
});
});
gulp.task('deleteDockerDb', callback => {
exec('docker stop dblocal && docker wait dblocal && docker rm -f dblocal', (err, stdout, stderr) => {
callback(err = null);
});
});
gulp.task('waitForMySQL', callback => {
let maxInterval = 30000;
let interval = 1000; let interval = 1000;
let timer = 0; let timer = 0;
console.log('Waiting for MySQL init process...'); console.log('Waiting for MySQL init process...');
@ -239,3 +213,27 @@ gulp.task('waitForMySQL', callback => {
} }
}, interval); }, interval);
}); });
gulp.task('docker-run', callback => {
exec('docker run -d --name dblocal -p 3306:3306 dblocal', (err, stdout, stderr) => {
callback(err);
});
});
gulp.task('docker-build', callback => {
exec('docker build -t dblocal:latest ./services/db', (err, stdout, stderr) => {
callback(err);
});
});
gulp.task('docker-delete-image', callback => {
exec('docker rmi dblocal:latest', (err, stdout, stderr) => {
callback(err);
});
});
gulp.task('docker-delete', callback => {
exec('docker stop dblocal && docker wait dblocal && docker rm -f dblocal', (err, stdout, stderr) => {
callback(err);
});
});

View File

@ -1 +1 @@
conect.ini connect.ini

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
[client]
host=localhost
port=3306
user=root
password=

2
services/db/script.cmd Normal file → Executable file
View File

@ -1,5 +1,5 @@
mysqldump --defaults-extra-file=conect.ini --default-character-set=utf8 --no-data --triggers --routines --events --databases account util vn2008 vn edi bs bi pbx cache salix vncontrol hedera > 01-structure.sql mysqldump --defaults-extra-file=connect.ini --default-character-set=utf8 --no-data --triggers --routines --events --databases account util vn2008 vn edi bs bi pbx cache salix vncontrol hedera > 01-structure.sql

View File

@ -3,5 +3,6 @@
"You are not allowed to change the credit": "No tienes privilegios para modificar el crédito", "You are not allowed to change the credit": "No tienes privilegios para modificar el crédito",
"Unable to mark the equivalence surcharge": "No se puede marcar el recargo de equivalencia", "Unable to mark the equivalence surcharge": "No se puede marcar el recargo de equivalencia",
"The default consignee can not be unchecked": "No se puede desmarcar el consignatario predeterminado", "The default consignee can not be unchecked": "No se puede desmarcar el consignatario predeterminado",
"Unable to default a disabled consignee": "No se puede poner predeterminado un consignatario desactivado" "Unable to default a disabled consignee": "No se puede poner predeterminado un consignatario desactivado",
"El método de pago seleccionado requiere que se especifique el IBAN": "El método de pago seleccionado requiere que se especifique el IBAN"
} }