Files
threshold-ui/ui/admin/tests/integration/components/ordered-series-diagram/index-test.js
T
Devon AndersonandRandall Morey cf66235948 feat: 🎸 OrderedSeriesDiagram component (#1573)
* feat: 🎸 OrderedSeriesDiagram component

Created `orderd-series-diagram` component to look a the state of the
ingress and egress filters and determine which diagram should be
displayed.

✅ Closes: ICU-6459

* refactor: 💡 sass lint fix

Fixed sass lint errors

✅ Closes: ICU-7347

* Update app.scss

added closing tag

* refactor: 💡 refactor of styling and test

Refactored styling for `ordered-series-diagram` to match mocks, and
fixed indent errors in test.

✅ Closes: ICU-7347

* refactor: 💡 clean up testing errors

Clean up testing errors for `ordered-series-diagram`

* refactor: 💡 refactor series diagram (#1577)

* refactor: 💡 merge refactor changes and fix test

Merged refactor changes to ordered series diagram and fix tests

✅ Closes: ICU-7347

Co-authored-by: Randall Morey <randall@randallmorey.com>
2023-01-13 13:22:16 -05:00

32 lines
1.0 KiB
JavaScript

import { module, test } from 'qunit';
import { setupRenderingTest } from 'admin/tests/helpers';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module(
'Integration | Component | ordered-series-diagram/index',
function (hooks) {
setupRenderingTest(hooks);
test('it renders two icon series', async function (assert) {
assert.expect(5);
await render(hbs`
<OrderedSeriesDiagram as |D|>
<D.Item @icon='user'>Client</D.Item>
<D.Item @icon='settings'>Egress Worker</D.Item>
</OrderedSeriesDiagram>
`);
assert.dom('[data-test-icon="user"]').isVisible();
assert.dom('.ordered-series-diagram-item-title').hasText('Client');
assert.dom('[data-test-icon="arrow-right"]').isVisible();
assert.dom('[data-test-icon="settings"]').isVisible();
assert
.dom(
'.ordered-series-diagram-item:last-child .ordered-series-diagram-item-title'
)
.hasText('Egress Worker');
});
}
);