2021-10-21 17:12:33 +00:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupTest } from 'ember-qunit';
|
|
|
|
import setupGlimmerComponentFactory from 'nomad-ui/tests/helpers/glimmer-factory';
|
|
|
|
|
2021-12-28 14:45:20 +00:00
|
|
|
module('Unit | Component | tooltip', function (hooks) {
|
2021-10-21 17:12:33 +00:00
|
|
|
setupTest(hooks);
|
|
|
|
setupGlimmerComponentFactory(hooks, 'tooltip');
|
|
|
|
|
2021-12-28 14:45:20 +00:00
|
|
|
test('long texts are ellipsised in the middle', function (assert) {
|
2021-12-28 16:08:12 +00:00
|
|
|
const tooltip = this.createComponent({
|
|
|
|
text: 'reeeeeeeeeeeeeeeeeally long text',
|
|
|
|
});
|
2021-10-21 17:12:33 +00:00
|
|
|
assert.equal(tooltip.text, 'reeeeeeeeeeeeee...long text');
|
|
|
|
});
|
|
|
|
});
|