nightmare controlles now the snackbarTimeout with nightmareModifiers.js plus small db update

This commit is contained in:
Carlos Jimenez 2018-01-26 08:01:26 +01:00
parent d49e497b15
commit 28096df321
4 changed files with 7 additions and 2 deletions

View File

@ -10,9 +10,9 @@ export default class App {
constructor($rootScope) {
this.loaderStatus = 0;
this.$rootScope = $rootScope;
this.timeout = window.snackbarTimeout || 2000;
}
show(message) {
this.timeout = window.snackbarTimeout || 2000;
if (this.snackbar) this.snackbar.show({message: message, timeout: this.timeout});
}
showMessage(message) {

View File

@ -8,6 +8,10 @@ export default function createNightmare(width = 1280, height = 720) {
fail(error);
});
nightmare.on('dom-ready', function() {
nightmare.inject('js', `${__dirname}/nightmareModifiers.js`);
});
nightmare.on('console', (type, message) => {
if (type === 'error') {
fail(message);

View File

@ -0,0 +1 @@
window.snackbarTimeout = 400;

View File

@ -366,7 +366,7 @@ INSERT INTO `vn2008`.`Trabajadores`(`CodigoTrabajador`, `Id_Trabajador`, `Nombre
('DCX', 3, 'Charles', 'Xavier', 8),
('HLK', 4, 'Bruce', 'Banner', 9),
('JJJ', 5, 'Jessica', 'Jones', 10),
('VSC', 20, 'Victor ', 'Stone', 11);
('VSC', 20, 'Victor', 'Stone', 11);
INSERT INTO `salix`.`ContactChannel`(`id`, `name`)
VALUES