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

[REPRODUCTION] Impossible to override type attribute #1177

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/@glimmer/integration-tests/lib/suites/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,26 @@ export class BasicComponents extends RenderTest {
this.assertHTML('<div id="qux"></div>');
}

@test({ kind: 'glimmer' })
'angle bracket invocation can allow invocation side to override "type" attribute with ...attributes'() {
this.registerComponent('Glimmer', 'Qux', '<div type="qux" ...attributes />');
this.registerComponent('Glimmer', 'Bar', '<Qux type="bar" ...attributes />');
this.registerComponent('Glimmer', 'Foo', '<Bar type="foo" ...attributes />');

this.render('<Foo type="top" />');
this.assertHTML('<div type="top"></div>');
}

@test({ kind: 'glimmer' })
'angle bracket invocation can override invocation side "type" attribute with ...attributes'() {
this.registerComponent('Glimmer', 'Qux', '<div ...attributes type="qux" />');
this.registerComponent('Glimmer', 'Bar', '<Qux ...attributes type="bar" />');
this.registerComponent('Glimmer', 'Foo', '<Bar ...attributes type="foo" />');

this.render('<Foo type="top" />');
this.assertHTML('<div type="qux"></div>');
}

@test({ kind: 'glimmer' })
'angle bracket invocation can forward classes before ...attributes to a nested component'() {
this.registerComponent('Glimmer', 'Qux', '<div class="qux" ...attributes />');
Expand Down