Hey guys,

I'm new to protractor and I'm trying to setup a test but it's throwing an 
UnexpectedAlertOpenError.

This is my test code:

it('Should have a addButton', function () {* //THIS WORKS FINE*
>         browser.get('/');//navigates the router to the route
>         var addContactButtonFinder = element(by.css('.glyphicon-plus'));  
>         expect(addContactButtonFinder).toBeDefined(); 
>     });
>     it('Should open a modal', function () { *//ONCE I TRY TO CLICK IN THE 
> ADD BUTTON FINDER ALERT ERROR IS SHOWN*
>         browser.get('/');//navigates the router to the route
>         var addContactButtonFinder = element(by.css('.glyphicon-plus'));   
>     
>         addContactButtonFinder.click();
>         var modal = element(by.id('contactForm'));  
>         expect(modal).toEqual(1);  
>     });


This is my testing code:

The link: 

> <li><a class="glyphicon glyphicon-plus" href="#" 
> ng-click="contactAction()"> Contact</a></li> 


The modal that shows once link is clicked:

> <form id="contactForm" name="contactForm" novalidate 
> class="form-horizontal" ng-submit="saveContact(contact, 
> contactForm.$valid)" role="form">  
> .............


What is happening ?!!

I'm using *protractor protractor.config* to run.

Thank you !

 

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to