mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-17 20:17:00 +02:00
* adds ember-flight-icons dependecy * adds inline-json-import babel plugin * adds flight icon styling * updates Icon component to support flight icons * updates Icon component usages to new api and updates name values to flight icon set when available * fixes tests * updates icon story with flight mappings and fixes issue with flight icons not rendering in storybook * adds changelog * fixes typo in sign action glyph name in transit-key model * adds comments to icon-map * updates Icon component to use only supported flight icon sizes * adds icon transform codemod * updates icon transform formatting to handle edge case * runs icon transform on templates * updates Icon usage in toolbar-filter md and story * updates tests
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
import { render } from '@ember/test-helpers';
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
import waitForError from 'vault/tests/helpers/wait-for-error';
|
|
|
|
module('Integration | Component | chevron', function(hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test('it renders', async function(assert) {
|
|
// Set any properties with this.set('myProperty', 'value');
|
|
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
|
|
await render(hbs`<Chevron />`);
|
|
assert.dom('.flight-icon').exists('renders');
|
|
|
|
await render(hbs`<Chevron @isButton={{true}} />`);
|
|
assert.dom('.flight-icon').hasClass('hs-icon-button-right', 'renders');
|
|
|
|
await render(hbs`<Chevron @direction='left' @isButton={{true}} />`);
|
|
assert.dom('.flight-icon').doesNotHaveClass('hs-icon-button-right', 'renders');
|
|
|
|
let promise = waitForError();
|
|
render(hbs`<Chevron @direction='lol' />`);
|
|
let err = await promise;
|
|
assert.ok(
|
|
err.message.includes('The direction property of <vault@component:chevron:'),
|
|
'asserts about unsupported direction'
|
|
);
|
|
});
|
|
});
|