Skip to content

Commit 1c5e6bb

Browse files
committed
Merge pull request #13366 from Serabe/feature/add-basic-test
[Glimmer2] Add test for component displaying a property
2 parents fd69421 + c3941ac commit 1c5e6bb

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/ember-glimmer/tests/integration/components/curly-components-test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,32 @@ moduleFor('Components test: curly components', class extends RenderingTest {
603603
assert.deepEqual(fooBarInstance.childViews, [fooBarBazInstance]);
604604
}
605605

606+
['@test it renders passed named arguments']() {
607+
this.registerComponent('foo-bar', {
608+
template: '{{foo}}'
609+
});
610+
611+
this.render('{{foo-bar foo=model.bar}}', {
612+
model: {
613+
bar: 'Hola'
614+
}
615+
});
616+
617+
this.assertText('Hola');
618+
619+
this.runTask(() => this.rerender());
620+
621+
this.assertText('Hola');
622+
623+
this.runTask(() => this.context.set('model.bar', 'Hello'));
624+
625+
this.assertText('Hello');
626+
627+
this.runTask(() => this.context.set('model', { bar: 'Hola' }));
628+
629+
this.assertText('Hola');
630+
}
631+
606632
['@test it can render a basic component with a block']() {
607633
this.registerComponent('foo-bar', { template: '{{yield}} - In component' });
608634

0 commit comments

Comments
 (0)