Run second waitFor in runs() block
It seems that this is more reliable way to handle async waits. runs block is executed only when first waitFor succeeds and then it waits for next waitFor.
This commit is contained in:
parent
a3c4468b5a
commit
4a15ccde32
|
@ -2,7 +2,8 @@ describe 'on the "build" state', ->
|
|||
beforeEach ->
|
||||
app 'travis-ci/travis-core/builds/1'
|
||||
waitFor reposRendered
|
||||
waitFor buildRendered
|
||||
runs ->
|
||||
waitFor buildRendered
|
||||
|
||||
afterEach ->
|
||||
window.history.pushState({}, null, '/spec.html')
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
beforeEach(function() {
|
||||
app('travis-ci/travis-core/builds/1');
|
||||
waitFor(reposRendered);
|
||||
return waitFor(buildRendered);
|
||||
return runs(function() {
|
||||
return waitFor(buildRendered);
|
||||
});
|
||||
});
|
||||
afterEach(function() {
|
||||
return window.history.pushState({}, null, '/spec.html');
|
||||
|
|
Loading…
Reference in New Issue
Block a user