[Admin UI] Adopt HDS::Copy::Snippet (#2141)
* refactor: 💡 Adopt HDS copy snippet
Adopt HDS copy snippet and delete usage of Copyable custom component
within Admin UI.
This commit is contained in:
1 parent
a1b455e5eb
commit
f002e14673
48 files changed
+135
-530
No files matched your search
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | copyable', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
this.set('actionText', 'text');
|
||||
|
||||
await render(
|
||||
hbs`<Copyable @buttonText="Copy me" @text="foo">{{this.actionText}}</Copyable>`,
|
||||
);
|
||||
|
||||
assert.ok(find('.copyable'));
|
||||
assert.strictEqual(find('.copyable-content').textContent.trim(), 'text');
|
||||
assert.strictEqual(find('.copyable-button').textContent.trim(), 'Copy me');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user