diff --git a/addon/models/scope.js b/addon/models/scope.js index fd7b2f09..7f050de5 100644 --- a/addon/models/scope.js +++ b/addon/models/scope.js @@ -5,6 +5,7 @@ import LocalizedModel from "ember-emeis/models/localized"; export default class ScopeModel extends LocalizedModel { @localizedAttr name; + @localizedAttr fullName; @localizedAttr description; @attr level; @attr meta; diff --git a/addon/templates/scopes/edit.hbs b/addon/templates/scopes/edit.hbs index cbfa4492..a111883d 100644 --- a/addon/templates/scopes/edit.hbs +++ b/addon/templates/scopes/edit.hbs @@ -1,18 +1,3 @@ -{{!-- -{{outlet}} --}} -

{{t "emeis.scopes.edit.edit-scope"}}

@@ -49,7 +34,7 @@ @placeholder="{{t "emeis.scopes.headings.parent"}}..." @onChange={{this.setParent}} as |scope| > - {{scope.name}} + {{scope.fullName}} diff --git a/tests/acceptance/scopes-test.js b/tests/acceptance/scopes-test.js index 1a5923b7..513de558 100644 --- a/tests/acceptance/scopes-test.js +++ b/tests/acceptance/scopes-test.js @@ -69,7 +69,7 @@ module("Acceptance | scopes", function (hooks) { await fillIn('[name="name"]', name); await fillIn('[name="description"]', description); - await selectChoose(".ember-power-select-trigger", futureParent.name.en); + await selectChoose(".ember-power-select-trigger", futureParent.fullName.en); this.assertRequest("PATCH", `/api/v1/scopes/${scope.id}`, (request) => { const { attributes, relationships } = JSON.parse( diff --git a/tests/dummy/mirage/factories/scope.js b/tests/dummy/mirage/factories/scope.js index c94edbb5..2f1449b2 100644 --- a/tests/dummy/mirage/factories/scope.js +++ b/tests/dummy/mirage/factories/scope.js @@ -5,6 +5,10 @@ import localize from "./localize"; export default Factory.extend({ name: () => localize(faker.company.companyName()), + fullName: () => + localize( + `${faker.company.companyName()} \u00bb ${faker.company.companyName()}` + ), description: () => localize(faker.lorem.paragraph()), level: () => 0, meta: () => {},