FIX: displays a title on sk header if no selected name (#9794)

none has to be defined.
This commit is contained in:
Joffrey JAFFEUX
2020-05-15 17:36:00 +02:00
committed by GitHub
parent 9810ca1dbd
commit b07f1bfd93
7 changed files with 62 additions and 29 deletions

View File

@ -60,13 +60,19 @@ componentTest("options.showFullTitle=false", {
value=value
content=content
options=(hash
icon="times"
showFullTitle=showFullTitle
none=none
)
}}
`,
beforeEach() {
setDefaultState(this, { showFullTitle: false });
setDefaultState(this, {
value: null,
showFullTitle: false,
none: "test_none"
});
},
async test(assert) {
@ -75,10 +81,19 @@ componentTest("options.showFullTitle=false", {
this.subject
.header()
.el()
.find(".selected-name .body")
.find(".selected-name")
),
"it hides the text of the selected item"
);
assert.equal(
this.subject
.header()
.el()
.attr("title"),
"[en_US.test_none]",
"it adds a title attribute to the button"
);
}
});