mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-14 04:31:02 +00:00
25 lines
795 B
JavaScript
25 lines
795 B
JavaScript
![]() |
import { moduleForComponent, test } from 'ember-qunit';
|
||
|
import hbs from 'htmlbars-inline-precompile';
|
||
|
import { triggerEvent } from 'ember-native-dom-helpers';
|
||
|
|
||
|
moduleForComponent('disable-bubble-input', 'Integration | Component | disable bubble input', {
|
||
|
integration: true
|
||
|
});
|
||
|
|
||
|
test('it renders', function(assert) {
|
||
|
this.render(hbs`{{disable-bubble-input id='test-disable'}}`);
|
||
|
|
||
|
assert.equal(document.querySelector('#test-disable').tagName, 'INPUT');
|
||
|
});
|
||
|
|
||
|
test('it invokes the click action on click', function(assert) {
|
||
|
const inputClickAction = () => {
|
||
|
assert.ok(true, 'disable input click action invoked');
|
||
|
};
|
||
|
this.set('inputClickAction', inputClickAction);
|
||
|
|
||
|
this.render(hbs`{{disable-bubble-input click=inputClickAction}}`);
|
||
|
|
||
|
triggerEvent('input[type=text]', 'click');
|
||
|
});
|