b6f6f4db37
* Bones of a new flyout section * Basic sidebar behaviour and style edits * Concept of a refID for service fragments to disambiguate task and group * A11y audit etc * Moves health check aggregation to serviceFragment model and retains history * Has to be a getter * flyout populated * Sidebar styling * Sidebar table and details added * Mirage fixture * Active status and table styles * Unit test mock updated * Acceptance tests for alloc services table and flyout * Chart styles closer to mock * Without a paused test * Consul and Nomad icons in services table * Alloc services test updates in light of new column changes * without using an inherited scenario
37 lines
975 B
JavaScript
37 lines
975 B
JavaScript
import { findAll, render } from '@ember/test-helpers';
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
import { module, test } from 'qunit';
|
|
import { componentA11yAudit } from 'nomad-ui/tests/helpers/a11y-audit';
|
|
|
|
module('Integration | Component | Service Status Bar', function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test('Visualizes aggregate status of a service', async function (assert) {
|
|
assert.expect(2);
|
|
const component = this;
|
|
await componentA11yAudit(component, assert);
|
|
|
|
const serviceStatus = {
|
|
success: 1,
|
|
pending: 1,
|
|
failure: 1,
|
|
};
|
|
|
|
this.set('serviceStatus', serviceStatus);
|
|
|
|
await render(hbs`
|
|
<div class="inline-chart">
|
|
<ServiceStatusBar
|
|
@status={{this.serviceStatus}}
|
|
@name="peter"
|
|
/>
|
|
</div>
|
|
`);
|
|
|
|
const bars = findAll('g > g').length;
|
|
|
|
assert.equal(bars, 3, 'It visualizes services by status');
|
|
});
|
|
});
|