Fix tests with new Ember version
This commit is contained in:
parent
e21bee6494
commit
ebb5f17058
|
@ -17,10 +17,8 @@ unless window.TravisApplication
|
||||||
@set('auth', Travis.Auth.create(app: this, endpoint: Travis.config.api_endpoint))
|
@set('auth', Travis.Auth.create(app: this, endpoint: Travis.config.api_endpoint))
|
||||||
|
|
||||||
reset: ->
|
reset: ->
|
||||||
@store.destroy()
|
|
||||||
@setup()
|
|
||||||
|
|
||||||
@_super.apply(this, arguments);
|
@_super.apply(this, arguments);
|
||||||
|
@setup()
|
||||||
|
|
||||||
lookup: ->
|
lookup: ->
|
||||||
@__container__.lookup.apply @__container__, arguments
|
@__container__.lookup.apply @__container__, arguments
|
||||||
|
|
|
@ -78,6 +78,7 @@ describe 'on the "current" state', ->
|
||||||
Em.run ->
|
Em.run ->
|
||||||
Travis.receive 'build:started', payload
|
Travis.receive 'build:started', payload
|
||||||
|
|
||||||
|
waits 10
|
||||||
runs ->
|
runs ->
|
||||||
displaysSummaryBuildLink '/travis-ci/travis-core/builds/11', '3'
|
displaysSummaryBuildLink '/travis-ci/travis-core/builds/11', '3'
|
||||||
|
|
||||||
|
|
|
@ -12,18 +12,17 @@ minispade.require 'app'
|
||||||
token: 'abcdef'
|
token: 'abcdef'
|
||||||
|
|
||||||
@app = (url, options = {}) ->
|
@app = (url, options = {}) ->
|
||||||
Travis.auth.signOut()
|
|
||||||
# TODO: this should wait till app is initialized, not some
|
# TODO: this should wait till app is initialized, not some
|
||||||
# arbitrary amount of time
|
# arbitrary amount of time
|
||||||
waits(50)
|
waits(50)
|
||||||
runs ->
|
runs ->
|
||||||
Travis.reset()
|
Travis.reset()
|
||||||
|
Travis.auth.signOut()
|
||||||
|
|
||||||
if options.user
|
if options.user
|
||||||
signInUser()
|
signInUser()
|
||||||
url = "/#{url}" unless url.match /^\//
|
url = "/#{url}" unless url.match /^\//
|
||||||
Travis.__container__.lookup('router:main').handleURL(url)
|
visit(url)
|
||||||
|
|
||||||
|
|
||||||
now = -> new Date('2012-07-02T00:03:00Z')
|
now = -> new Date('2012-07-02T00:03:00Z')
|
||||||
$.timeago.settings.nowFunction = -> now().getTime()
|
$.timeago.settings.nowFunction = -> now().getTime()
|
||||||
|
|
|
@ -47,8 +47,12 @@
|
||||||
<script src="/scripts/app.js"></script>
|
<script src="/scripts/app.js"></script>
|
||||||
<script>
|
<script>
|
||||||
window.testMode = true;
|
window.testMode = true;
|
||||||
minispade.require('travis')
|
minispade.require('travis');
|
||||||
Travis.advanceReadiness()
|
Ember.run(function(){
|
||||||
|
Travis.setupForTesting();
|
||||||
|
Travis.injectTestHelpers()
|
||||||
|
Travis.advanceReadiness();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/scripts/specs.js"></script>
|
<script src="/scripts/specs.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user