mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
877dc89ddb
closes https://github.com/TryGhost/Ghost/issues/7149 - fix tests in Safari - fix template tag issue in IE and edge - various IE css fixes
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
/* jshint expr:true */
|
|
import { expect } from 'chai';
|
|
import {
|
|
describeComponent,
|
|
it
|
|
} from 'ember-mocha';
|
|
import {A as emberA} from 'ember-array/utils';
|
|
import run from 'ember-runloop';
|
|
|
|
describeComponent(
|
|
'gh-selectize',
|
|
'Unit: Component: gh-selectize',
|
|
{
|
|
// Specify the other units that are required for this test
|
|
// needs: ['component:foo', 'helper:bar'],
|
|
unit: true
|
|
},
|
|
function () {
|
|
it('re-orders selection when selectize order is changed', function () {
|
|
let component = this.subject();
|
|
|
|
run(() => {
|
|
component.set('content', emberA(['item 1', 'item 2', 'item 3']));
|
|
component.set('selection', emberA(['item 2', 'item 3']));
|
|
component.set('multiple', true);
|
|
});
|
|
|
|
this.render();
|
|
|
|
run(() => {
|
|
component._selectize.setValue(['item 3', 'item 2']);
|
|
});
|
|
|
|
expect(component.get('value').toArray(), 'component value').to.deep.equal(['item 3', 'item 2']);
|
|
expect(component.get('selection').toArray(), 'component selection').to.deep.equal(['item 3', 'item 2']);
|
|
});
|
|
}
|
|
);
|