FEATURE: show tags in search results
This commit is contained in:
@@ -25,6 +25,18 @@ QUnit.test("search", (assert) => {
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("search for a tag", (assert) => {
|
||||
visit("/");
|
||||
|
||||
click('#search-button');
|
||||
|
||||
fillIn('#search-term', 'evil');
|
||||
keyEvent('#search-term', 'keyup', 16);
|
||||
andThen(() => {
|
||||
assert.ok(exists('.search-menu .results ul li'), 'it shows results');
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test("search scope checkbox", assert => {
|
||||
visit("/c/bug");
|
||||
click('#search-button');
|
||||
|
||||
@@ -108,6 +108,16 @@ export default function() {
|
||||
id: 1234
|
||||
}]
|
||||
});
|
||||
} else if (request.queryParams.q === 'evil') {
|
||||
return response({
|
||||
posts: [{
|
||||
id: 1234
|
||||
}],
|
||||
tags: [{
|
||||
id: 6,
|
||||
name: 'eviltrout'
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
return response({});
|
||||
|
||||
Reference in New Issue
Block a user