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