one test case has not finished, next test case has already started
because almost every thing defined in test cases are based on promise, the promise is like function declaration that will be executed later if some interesting events happen. if events come a little late, then test case has already finished. the question is how can wait for one test case really finished, which means all the defers are fulfilled or rejected defined in that test case, or we can send a message to spec engine telling him this test case has finished.
Protractor cancels any remaining promises if a test case fails or times out - check out https://github.com/angular/protractor/blob/master/jasminewd/index.js#L165 to see where this happens.
(Note that this only works for Jasmine tests right now, not for the beta Mocha tests!)
Of course, Protractor cannot tell your site to cancel any actions, so you may still have pending actions on the site that are not cancelled. Testing when these are done will be specific to your app.
for example:
describe('do something',function(){
it('test case 1',function(){
someAction().then(function(){
do something for this action 1
)
someAction().then(function(){
do something for this action 2
)
someAction().then(function(){
do something for this action 3
)
})
it('test case 2',function(){
....
})
})
in test case 1, the code block "do something for this action 3" has not been executed yet, test case 2 has already started
That should not be the case. Are you using Jasmine or Mocha? Is your test failing or timing out? Can you make a reproducible case that runs against the test app?
Haven't heard anything - closing as obsolete. Please open a new issue if there is a reproducible problem.