chore: 🤖 move loading-button component to core addon (#1083)

This commit is contained in:
Randall Morey authored and GitHub committed 2022-04-28 17:49:03 -04:00
1 parent 01e4ec0a07
commit 043dbc3736
7 files changed
+13 -58

No files matched your search

@@ -0,0 +1,20 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find, click } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | loading-button', function (hooks) {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
await render(hbs`<LoadingButton />`);
assert.ok(find('.loading-button'));
});
test('it executes a function on refresh button click', async function (assert) {
assert.expect(2);
this.onClick = () => assert.ok(true, 'refresh was clicked');
await render(hbs`<LoadingButton @onClick={{this.onClick}}/>`);
assert.ok(find('.loading-button'));
await click('button');
});
});