Ayuda con A Jasmine spec timed out.
Publicado por Michel Baran (3 intervenciones) el 11/12/2018 13:36:12
Buenas a todos, perdón que los moleste con esta tontería, estoy haciendo un trabajo en protractor js y pese a que es bastante simple lo que quiero hacer, me sale un error de
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at Timeout._onTimeout (/usr/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4281:23)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)

Mis funciones son sencillas, no entiendo que origina este error, si corro el código sin el while funciona tengo que correrlo varias veces para poder crear toda la cena, si pongo un for o un while de una sola iteración, funciona, pero si mi for o mi while exigen un segunda iteracion o 350 más, siempre salta el error antes mencionado en la ultima, única y exclusivamente en la ultima iteración.
Por favor ayuda!
Mis funciones:
Posiblemente sea una tontería pero estoy invirtiendo demasiado tiempo en averiguar cual puede ser el causante y no logro descubrirlo, alguna idea o sugerencia.
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at Timeout._onTimeout (/usr/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4281:23)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)

Mis funciones son sencillas, no entiendo que origina este error, si corro el código sin el while funciona tengo que correrlo varias veces para poder crear toda la cena, si pongo un for o un while de una sola iteración, funciona, pero si mi for o mi while exigen un segunda iteracion o 350 más, siempre salta el error antes mencionado en la ultima, única y exclusivamente en la ultima iteración.
Por favor ayuda!
Mis funciones:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
it('Cargar Articulo 0', function() {
// //CREAR//
var i = 0;
var cantidad = 0;
while(i++ < 3){
element.all(by.repeater(datos.seleccionarTabla.repetidor))
.then(function(articulos){
cantidad = articulos.length;
});
browser.driver.sleep(3000);
cargarDatos11();
testArticulos.cargarDatosSinBoton(datos.cargarDatos11);
browser.driver.sleep(3000);
testArticulos.boton(boton[0]);
browser.driver.sleep(3000);
element.all(by.repeater(datos.seleccionarTabla.repetidor))
.then(function(items){
expect(items.length).toBe(cantidad+1);
testArticulos.boton(boton[4]);
});
};
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function cargarDatos11() {
var aux = Math.floor(Math.random() * (10 - 0));
switch (aux) {
case 0:
datos.cargarDatos11 = {
campo: campos,
datos: [RandNum(), 'Lomito', '10000', '7000'],
boton: boton[0]
};
break;
case 1:
datos.cargarDatos11 = {
campo: campos,
datos: [RandNum(), 'Hamburguesa', '7000', '5000'],
boton: boton[0]
};
break;
case 2:
datos.cargarDatos11 = {
campo: campos,
datos: [RandNum(), 'Pizza', '20000', '15000'],
boton: boton[0]
};
break;
case 3:
datos.cargarDatos11 = {
campo: campos,
datos: [RandNum(), 'Milanesa', '5000', '3000'],
boton: boton[0]
};
break;
default:
datos.cargarDatos11 = {
campo: campos,
datos: [RandNum(), 'Papas Fritas', '5000', '3000'],
boton: boton[0]
};
}
}
Posiblemente sea una tontería pero estoy invirtiendo demasiado tiempo en averiguar cual puede ser el causante y no logro descubrirlo, alguna idea o sugerencia.
Valora esta pregunta


0