Skip to content

Commit

Permalink
use ember-intl to get title instead of hardcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchadwick committed Jul 25, 2024
1 parent 23c9ac3 commit fe6e9a5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ module('Integration | Component | user-guide-link', function (hooks) {
setupIntl(hooks, 'en-us');

test('it renders', async function (assert) {
this.intl = this.owner.lookup('service:intl');

await render(hbs`<UserGuideLink />`);

assert.ok(component);
assert.ok(component.icon);
assert.strictEqual(component.icon.title, 'Ilios User Guide');
assert.strictEqual(component.icon.title, this.intl.t('general.iliosUserGuide'));

await setLocale('es');
assert.strictEqual(component.icon.title, 'Ilios Guía de usuario');
assert.strictEqual(component.icon.title, this.intl.t('general.iliosUserGuide'));

await setLocale('fr');
assert.strictEqual(component.icon.title, "Ilios Guide d'utilisation");
assert.strictEqual(component.icon.title, this.intl.t('general.iliosUserGuide'));
});
});

0 comments on commit fe6e9a5

Please sign in to comment.