Skip to content

Commit

Permalink
ci(tests/integration/components/paper-radio-test): adds test for sett…
Browse files Browse the repository at this point in the history
…ing `@checked` directly.
  • Loading branch information
matthewhartstonge committed Dec 30, 2024
1 parent f4de6ce commit 48b6aae
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/integration/components/paper-radio-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ module('Integration | Component | paper radio', function(hooks) {
assert.dom('md-radio-button').doesNotHaveClass('md-checked');
});

test('should set and remove checked css class if checked is passed in', async function(assert) {
assert.expect(2);

this.set('checked', true);
await render(hbs`
{{#paper-radio value="1" checked=checked onChange=(action (mut checked))}}
Radio button 1
{{/paper-radio}}
`);
assert.dom('md-radio-button').hasClass('md-checked');

this.set('checked', false);
assert.dom('md-radio-button').doesNotHaveClass('md-checked');
});


test('should trigger an action when checking', async function(assert) {
assert.expect(1);

Expand Down

0 comments on commit 48b6aae

Please sign in to comment.