mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
8c8365720b
closes https://github.com/TryGhost/Ghost/issues/7073 - reverts `ember-wormhole` to 0.3.6 - adds working test that was broken under `ember-wormhole` 0.4.0
40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
/* jshint expr:true */
|
|
import { expect } from 'chai';
|
|
import {
|
|
describeComponent,
|
|
it
|
|
} from 'ember-mocha';
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
import run from 'ember-runloop';
|
|
import wait from 'ember-test-helpers/wait';
|
|
|
|
describeComponent(
|
|
'gh-search-input',
|
|
'Integration: Component: gh-search-input',
|
|
{
|
|
integration: true
|
|
},
|
|
function () {
|
|
it('renders', function () {
|
|
// renders the component on the page
|
|
this.render(hbs`{{gh-search-input}}`);
|
|
|
|
expect(this.$('.ember-power-select-search input')).to.have.length(1);
|
|
});
|
|
|
|
it('opens the dropdown on text entry', function (done) {
|
|
this.render(hbs`{{gh-search-input}}`);
|
|
|
|
// enter text to trigger search
|
|
run(() => {
|
|
this.$('input[type="search"]').val('test').trigger('input');
|
|
});
|
|
|
|
wait().then(() => {
|
|
expect(this.$('.ember-basic-dropdown-content').length).to.equal(1);
|
|
done();
|
|
});
|
|
});
|
|
}
|
|
);
|