From d4ae0a2819aaff6d56fe76a832fc43ce7bb5774d Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Fri, 19 Apr 2019 17:51:45 -0700 Subject: [PATCH] Integration test for the alloc row icon --- ui/tests/integration/allocation-row-test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ui/tests/integration/allocation-row-test.js b/ui/tests/integration/allocation-row-test.js index bd3c48f21..70b816ac6 100644 --- a/ui/tests/integration/allocation-row-test.js +++ b/ui/tests/integration/allocation-row-test.js @@ -123,6 +123,23 @@ module('Integration | Component | allocation row', function(hooks) { }); }); + test('Allocation row shows an icon indicator when it was preempted', async function(assert) { + const allocId = this.server.create('allocation', 'preempted').id; + + const allocation = await this.store.findRecord('allocation', allocId); + await settled(); + + this.setProperties({ allocation, context: 'job' }); + await render(hbs` + {{allocation-row + allocation=allocation + context=context}} + `); + await settled(); + + assert.ok(find('[data-test-icon="preemption"]'), 'Preempted icon is shown'); + }); + test('when an allocation is not running, the utilization graphs are omitted', function(assert) { this.setProperties({ context: 'job',