mercredi 26 octobre 2016

No specs found when looping tests on protractor

I'm using protractor on Selenium, MacOSX and Chorme. I'm trying to run the same test using an array of elements to provide the test data:

As I read here: Looping on a protractor test with parameters

I was trying that solution but when I run it, my test is not even found:

 for(var i = 0; casos.length; i++){

            (function(cotizacion){
                it('obtener $1,230.00 de la cotizacion', function(){
                    browser.get('http://ift.tt/2f8afDl');
                    login(user,pass);
                    fillVidaCotizadorForm(formData);
                    //browser.sleep(5000);
                    var primaTotal = element(by.binding('vida.primaTotal'));
                    browser.wait(EC.visibilityOf(primaTotal),4000);
                    expect(primaTotal.getText()).toBe(cotizacion);
                });
            })(casos[i].Fallecimiento);
        }

Output message:

> [14:13:01] I/hosted - Using the selenium server at
> http://localhost:4444/wd/hub [14:13:01] I/launcher - Running 1
> instances of WebDriver Started
> 
> 
> No specs found Finished in 0.003 seconds

This loop is inside my describe function and if I run the test normally without any loop, it runs flawless.

Aucun commentaire:

Enregistrer un commentaire