feat: Add empty copy-button component to ui/core
This commit is contained in:
3 files changed
+31
No files matched your search
@@ -0,0 +1 @@
|
||||
{{yield}}
|
||||
@@ -0,0 +1,4 @@
|
||||
import Component from '@glimmer/component';
|
||||
|
||||
export default class CopyButtonComponent extends Component {
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | copy-button', 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`<CopyButton />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<CopyButton>
|
||||
template block text
|
||||
</CopyButton>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user