Assert that the scale up/down indicator is not shown when the count is null
This commit is contained in:
parent
13af67ac80
commit
602b6771ba
|
@ -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;
|
||||
})
|
||||
|
|
|
@ -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"}}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue