mirror of https://github.com/zulip/zulip.git
node tests: Add spectator test for search suggestions.
This is a prep commit to help us soon remove 44 months worth of bit-rotted code.
This commit is contained in:
parent
599a70d6f4
commit
bffd73fe44
|
@ -93,6 +93,16 @@ test("basic_get_suggestions", ({override_rewire}) => {
|
|||
assert.deepEqual(suggestions.strings, expected);
|
||||
});
|
||||
|
||||
test("basic_get_suggestions_for_spectator", ({override_rewire}) => {
|
||||
override_rewire(stream_data, "subscribed_streams", () => []);
|
||||
page_params.is_spectator = true;
|
||||
|
||||
const query = "";
|
||||
const suggestions = get_suggestions("", query);
|
||||
assert.deepEqual(suggestions.strings, ["", "has:link", "has:image", "has:attachment"]);
|
||||
page_params.is_spectator = false;
|
||||
});
|
||||
|
||||
test("subset_suggestions", () => {
|
||||
const query = "stream:Denmark topic:Hamlet shakespeare";
|
||||
|
||||
|
|
Loading…
Reference in New Issue