Skip to content

Commit

Permalink
Use ember-test-selectors for subtitle assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescdavis committed Jul 17, 2018
1 parent 2c9d28a commit f213fae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<div class="{{className}}__content">
<div class="{{className}}__title"></div>
{{#if subtitle}}
<div class="{{className}}__subtitle"></div>
<div class="{{className}}__subtitle" data-test-ember-content-placeholders-heading-subtitle></div>
{{/if}}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ test('it renders', function(assert) {
assert.equal(this.$('[data-test-ember-content-placeholders-heading-img]').length, 1, 'it has an img');

this.render(hbs`{{content-placeholders-heading subtitle=false}}`);
assert.equal(this.$('.ember-content-placeholders-heading__subtitle').length, 0, 'it has no subtitle');
assert.equal(this.$('[data-test-ember-content-placeholders-heading-subtitle]').length, 0, 'it has no subtitle');

this.render(hbs`{{content-placeholders-heading}}`);
assert.equal(this.$('.ember-content-placeholders-heading__subtitle').length, 1, 'it has a subtitle');
assert.equal(this.$('[data-test-ember-content-placeholders-heading-subtitle]').length, 1, 'it has a subtitle');
});

0 comments on commit f213fae

Please sign in to comment.