I am trying to test my ember.js and rails app with Konacha.
I want to load my ember app and be able to transition to the root.index route and the app should load into the iframe.
I have stripped this down to this code and am simply trying to show the application template in the iframe.
window.App = Ember.Application.create(
rootElement: 'body'
)
App.store = DS.Store.create(
revision: 4
adapter: DS.RESTAdapter.create(bulkCommit: false, namespace: "admin" )
)
App.ApplicationController = Em.Controller.extend()
App.ApplicationView = Em.View.extend
template: Ember.Handlebars.compile('Hello Rick')
App.Router = Em.Router.extend
location : Ember.Location.create(
implementation : 'hash'
)
root: Ember.Route.extend
index: Ember.Route.extend
route: '/'
App.router = App.Router.create()
App.initialize(App.router)
describe "Testing Ember", ->
it "Should show Hello Rick", ->
Em.run ->
App.router.transitionTo('index')
The test transitions to the correct route but does not display the template.
I can only get it to display the template if i append the appication view manually like this in the test
App.view = App.ApplicationView.create()
App.view.append()
Can anyone help with this as i want to launch my whole app into the iframe and not just parts of it.
Thanks Rick