mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 10:24:13 +08:00
FIX: displays a title on sk header if no selected name (#9794)
none has to be defined.
This commit is contained in:
@ -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"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user