dotJEM / angular-routing

Enhanced state based routing for Angular applications!
https://dotjem.github.io/angular-routing/
MIT License
75 stars 9 forks source link

Protractor not working with dotJEM routing #101

Closed KasMA1990 closed 10 years ago

KasMA1990 commented 10 years ago

I have an angular chat app that I'm doing e2e testing on with Protractor, and one issue that I've found is with the app's use of jemview.

I have a message list and message field for typing messages in, but none of this is reachable by Protractor when it goes through this piece of code:

<div jem-view="chatroom" class="sw-chat-message-frame"></div>

When going around the jem view (that is, copy pasting everything in its place), Protractor can interact with the site fine.

dotJEM v. 0.6.1 Protractor v. 0.21 Selenium v. 2.40.0/2.41.0 AngularJS v. 1.2.5 Chrome v. 34 Firefox v. 28

jeme commented 10 years ago

If you could provide a smallish example project to demonstrate the issue that would be most appreciated.

As far as I could gather Protractors "waitForAngular" should do the right thing, but maybe the "line" is cut at some point.

As a side note though, it appears that for complex apps it might not be enough as suggested here: https://github.com/angular/protractor/issues/279

KasMA1990 commented 10 years ago

I don't think it's about waiting for Angular; the project has other apps that work just fine with Protractor, and the use of jem-view seems to be the major difference.

I'll get on making a sample.

jeme commented 10 years ago

That would be great, as I did get Protractor up and running, but in a very simple sample I couldn't reproduce the problem.

But I only just touched the surface, accessing a single element inside a view by it's binding. Like so:

browser.get('/ProtractorExample/');

//Note: Just using ID's as it was quick for testing...
var elm =  element(by.id('link_about'));
elm.click();

var elm2 =  element(by.binding('model'));
expect(elm2.getText()).toBe("Hello from AboutController");

(note: I tested on the latest build though, but I can't recall any changes that should have caused changes to this)

KasMA1990 commented 10 years ago

You should check your work email ;)

jeme commented 10 years ago

Nothing, you probably e-mailed the wrong Jens. (We are 2 with very similar names ;) )

KasMA1990 commented 10 years ago

Aaaand again :p

jeme commented 10 years ago

Closed due to inactivity. This could not be reproduced.