Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLEANUP beta] Only register view keyword helper when legacy enabled #11800

Merged
merged 2 commits into from Jul 18, 2015
Merged

[CLEANUP beta] Only register view keyword helper when legacy enabled #11800

merged 2 commits into from Jul 18, 2015

Conversation

ghost
Copy link

@ghost ghost commented Jul 17, 2015

Another part of #11775

Node tests fail.

@rwjblue
Copy link
Member

rwjblue commented Jul 17, 2015

To fix the node tests you need to update this test to something like this:

QUnit.test("It is possible to render a view with a nested {{component}} helper in Node", function(assert) {
    var registry = new Ember.Application.buildRegistry();
    var container = registry.container();

    var View = Ember.Component.extend({
      container: container,
      renderer: new Ember._Renderer(new DOMHelper(new SimpleDOM.Document())),
      layout: compile("<h1>Hello {{#if hasExistence}}{{location}}{{/if}}</h1> <div>{{component 'foo-bar'}}</div>"),
      location: "World",
      hasExistence: true
    });
    var view = View.create();

    registry.register('template:components/foo-bar', compile('<p>The files are *inside* the computer?!</p>'));
    run(view, view.createElement);

    var serializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);
    assert.ok(serializer.serialize(view.element).match(/<h1>Hello World<\/h1> <div><div id="(.*)" class="ember-view"><p>The files are \*inside\* the computer\?\!<\/p><\/div><\/div>/));
  });

@ghost
Copy link
Author

ghost commented Jul 18, 2015

The fix for that test ended up being much simpler than expected.
It still fails :(
Finally fixed it.

rwjblue added a commit that referenced this pull request Jul 18, 2015
…-keyword

[CLEANUP beta] Only register view keyword helper when legacy enabled
@rwjblue rwjblue merged commit 408047d into emberjs:master Jul 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants