Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Assertions inside .then() are ignored #267

Closed
finishingmove opened this issue Nov 17, 2013 · 2 comments
Closed

Assertions inside .then() are ignored #267

finishingmove opened this issue Nov 17, 2013 · 2 comments

Comments

@finishingmove
Copy link

Example:

$$('.item').then(function(items){
expect(items.length).toEqual(20);
});

1 tests, 0 assertions, 0 failures.

$$('.item').then(function(items){
expect(false).toEqual(true);
});

1 tests, 0 assertions, 0 failures.

The findElements spec implies this should work: https://github.com/angular/protractor/blob/master/spec/basic/findelements_spec.js

@juliemr
Copy link
Member

juliemr commented Nov 18, 2013

This is specific to $$().then and element.all().then. Looking into it!

@finishingmove
Copy link
Author

I can confirm that assertions inside browser.wait().then() are working as expected, but I wasn't able to achieve the same logic needed for my tests using that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants