Skip to content

Commit

Permalink
Failing test for forwarding attributes to yielded components
Browse files Browse the repository at this point in the history
Extracted from emberjs/ember.js#17146

(cherry picked from commit 2a42ddb)
  • Loading branch information
cibernox authored and rwjblue committed Jan 22, 2019
1 parent 8546b08 commit fc20d64
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/@glimmer/test-helpers/lib/suites/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,30 @@ export class BasicComponents extends RenderTest {
this.assertStableNodes();
}

@test({
kind: 'basic',
})
'invoke a component forwarding attributes'() {
this.registerComponent(
'Glimmer',
'InnerComponent',
'<p data-foo="target" ...attributes>Inner Component</p>'
);
this.render(
{
name: 'OuterComponent',
layout: '{{#with (component "InnerComponent") as |Inner|}}<Inner ...attributes />{{/with}}',
template: 'hello!',
args: {},
attributes: { title: 'Emberconf' },
},
{}
);
debugger;
this.assertHTML("<div title='emberconf'><p data-foo='target' title='Emberconf'>Inner Component</p></div>");
this.assertStableRerender();
}

@test({
kind: 'basic',
})
Expand Down

0 comments on commit fc20d64

Please sign in to comment.