gulp task created to run fixtures before e2e tests
This commit is contained in:
parent
c1e798790f
commit
22d482f1c6
|
@ -12,7 +12,7 @@ export default class App {
|
|||
this.$rootScope = $rootScope;
|
||||
}
|
||||
show(message) {
|
||||
if (this.snackbar) this.snackbar.show({message: message, timeout: 400});
|
||||
if (this.snackbar) this.snackbar.show({message: message});
|
||||
}
|
||||
showMessage(message) {
|
||||
this.show(message);
|
||||
|
|
|
@ -8,7 +8,7 @@ const moduleAccessViewHashURL = '#!/';
|
|||
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
|
||||
|
||||
fdescribe('Add credit path', () => {
|
||||
describe('Add credit path', () => {
|
||||
describe('warm up', () => {
|
||||
it('should warm up login and fixtures', done => {
|
||||
nightmare
|
||||
|
|
17
gulpfile.js
17
gulpfile.js
|
@ -147,7 +147,7 @@ gulp.task('watch', function() {
|
|||
gulp.watch(localeFiles, ['locales']);
|
||||
});
|
||||
|
||||
// Test environment
|
||||
// Server side unit tests
|
||||
gulp.task('test', callback => {
|
||||
return require('./services_tests').start();
|
||||
});
|
||||
|
@ -161,22 +161,25 @@ gulp.task('runDockerLogs', callback => {
|
|||
let timer = 0;
|
||||
let waitForLocaldb = setInterval(() => {
|
||||
if (timer < 15000) {
|
||||
timer += 1000;
|
||||
exec('docker logs dblocal', (err, stdout, stderr) => {
|
||||
if (stdout.includes('starting as process 1')) {
|
||||
console.log(stdout);
|
||||
timer += 2000;
|
||||
exec('docker logs --tail 4 dblocal', (err, stdout, stderr) => {
|
||||
console.log('Waiting for MySQL init process...');
|
||||
if (stdout.includes('MySQL init process done. Ready for start up.')) {
|
||||
console.log('MySQL init process done.');
|
||||
clearInterval(waitForLocaldb);
|
||||
callback(err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log('MySQL connection not established whithin 15 secs!');
|
||||
clearInterval(waitForLocaldb);
|
||||
}
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
gulp.task('endToEndTests', callback => {
|
||||
exec('node e2e_tests', err => {
|
||||
exec('npm run e2e', (err, stdout, stderr) => {
|
||||
console.log(stdout);
|
||||
callback(err);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
"name": "vn-loopback",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"start": "node .",
|
||||
"posttest": "npm run lint && nsp check"
|
||||
"start": "node ."
|
||||
},
|
||||
"dependencies": {
|
||||
"compression": "^1.0.3",
|
||||
|
|
Loading…
Reference in New Issue