mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-15 11:07:00 +02:00
* remove title-number class and consolidate border radius * move selectable card to core addon * add top padding to db cards * update transform icon color * new selectable card component * fix db test * use selectable card in mount backend form * fix query param for overview card * update tests * fix replication card styling * make card accessible; * update tabindex * change to standalone for error handling * update test selector * update tests * go back to number only css class * fix on click tests * add changelog * update class name in template file * delete box radio
30 lines
896 B
JavaScript
30 lines
896 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
import { click, render } from '@ember/test-helpers';
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
import sinon from 'sinon';
|
|
|
|
module('Integration | Component selectable-card', function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
hooks.beforeEach(function () {
|
|
this.onClick = sinon.spy();
|
|
});
|
|
|
|
test('it renders', async function (assert) {
|
|
await render(hbs`<SelectableCard @onClick={{this.onClick}}/>`);
|
|
await click('.selectable-card');
|
|
assert.ok(this.onClick.calledOnce, 'calls on click');
|
|
});
|
|
|
|
test('it renders block content', async function (assert) {
|
|
await render(hbs`<SelectableCard @onClick={{this.onClick}}>hello</SelectableCard>`);
|
|
assert.dom('.selectable-card').hasText('hello');
|
|
});
|
|
});
|