feat: Add empty copy-button component to ui/core

This commit is contained in:
Susmitha Girumala committed 2020-09-29 11:14:07 -04:00
1 parent f88b7e848b
commit c7b49920f6
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');
});
});