Assert that the scale up/down indicator is not shown when the count is null

This commit is contained in:
Michael Lange 2020-07-28 11:03:47 -07:00
parent 13af67ac80
commit 602b6771ba
3 changed files with 8 additions and 2 deletions

View File

@ -11,6 +11,11 @@ export default class ScaleEvent extends Fragment {
@attr('boolean') error;
@attr('string') evalId;
@computed('count', function() {
return this.count != null;
})
hasCount;
@computed('count', 'previousCount', function() {
return this.count > this.previousCount;
})

View File

@ -10,7 +10,7 @@
</span>
</div>
<div class="column is-2">
{{#if (gte a.item.count 0)}}
{{#if a.item.hasCount}}
<span data-test-count-icon>
{{#if a.item.increased}}
{{x-icon "arrow-up" class="is-danger"}}

View File

@ -93,7 +93,8 @@ module('Integration | Component | scale-events-accordion', function(hooks) {
await render(commonTemplate);
assert.equal(find('[data-test-count]').textContent, '');
assert.notOk(find('[data-test-count]'));
assert.notOk(find('[data-test-count-icon]'));
});
test('when an event has no meta properties, the accordion entry is not expandable', async function(assert) {