mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:23:25 +08:00
FIX: topic title in search contains data-topic-id (#9435)
Data topic id is required by the discourse-encrypt plugin. Related to https://github.com/discourse/discourse-encrypt/pull/12
This commit is contained in:
parent
e8e764c064
commit
5a60a4233e
|
@ -145,7 +145,11 @@ createSearchResult({
|
|||
|
||||
const firstLine = [
|
||||
this.attach("topic-status", { topic, disableActions: true }),
|
||||
h("span.topic-title", new Highlighted(topic.fancyTitle, term))
|
||||
h(
|
||||
"span.topic-title",
|
||||
{ attributes: { "data-topic-id": topic.id } },
|
||||
new Highlighted(topic.fancyTitle, term)
|
||||
)
|
||||
];
|
||||
|
||||
const secondLine = [
|
||||
|
|
|
@ -28,6 +28,10 @@ QUnit.test("search", async assert => {
|
|||
await fillIn("#search-term", "dev");
|
||||
await keyEvent("#search-term", "keyup", 16);
|
||||
assert.ok(exists(".search-menu .results ul li"), "it shows results");
|
||||
assert.ok(
|
||||
exists(".search-menu .results ul li .topic-title[data-topic-id]"),
|
||||
"topic has data-topic-id"
|
||||
);
|
||||
|
||||
await click(".show-help");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user