Skip to content

Commit

Permalink
refactor(search-street): split select hints into separate tags
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabauke authored and luytena committed Apr 18, 2024
1 parent c39ef38 commit 21767c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
7 changes: 6 additions & 1 deletion addon/components/search-street.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@
streetList.description.descriptionLong
}}
<small
data-test-street-esid
data-test-search-street-locality-name
class="uk-text-muted uk-text-right uk-text-italic uk-margin-small-left"
>{{t "ember-gwr.locality.name.nameLong"}}:
{{streetList.locality.name.nameLong}},
</small>
<small
data-test-search-street-esid
class="uk-text-muted uk-text-right uk-text-italic uk-margin-small-left"
>
{{t "ember-gwr.street.ESID"}}:
{{streetList.ESID}}</small>
{{/if}}
Expand Down
15 changes: 9 additions & 6 deletions tests/integration/components/search-street-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
} from "ember-power-select/test-support/helpers";
import { module, test } from "qunit";

module("Integration | Component | search-street", function (hooks) {
module("Integration | Component | search-street", function(hooks) {
setupRenderingTest(hooks);

test("it renders", async function (assert) {
test("it renders", async function(assert) {
this.set("street");
this.set("options", {
locality: {
Expand Down Expand Up @@ -81,9 +81,12 @@ module("Integration | Component | search-street", function (hooks) {
.dom(".ember-power-select-selected-item")
.containsText("Eisenburgstrasse");
assert
.dom(".ember-power-select-selected-item [data-test-street-esid]")
.hasText(
"t:ember-gwr.locality.name.nameLong:(): , t:ember-gwr.street.ESID:(): 1234",
);
.dom(
".ember-power-select-selected-item [data-test-search-street-locality-name]",
)
.hasText("t:ember-gwr.locality.name.nameLong:(): ,");
assert
.dom(".ember-power-select-selected-item [data-test-search-street-esid]")
.hasText("t:ember-gwr.street.ESID:(): 1234");
});
});

0 comments on commit 21767c8

Please sign in to comment.