mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 00:23:49 +00:00
Cover more variations of narrowing in test_describe()
(imported from commit 145e9f624ea460c62a62f3da2d8e328642c5e2d6)
This commit is contained in:
@@ -398,6 +398,42 @@ function get_predicate(operators) {
|
||||
string = 'Narrow to all private messages, Search for lunch';
|
||||
assert.equal(Filter.describe(narrow), string);
|
||||
|
||||
narrow = [
|
||||
{operator: 'id', operand: 99}
|
||||
];
|
||||
string = 'Narrow to message ID 99';
|
||||
assert.equal(Filter.describe(narrow), string);
|
||||
|
||||
narrow = [
|
||||
{operator: 'in', operand: 'home'}
|
||||
];
|
||||
string = 'Narrow to messages in home';
|
||||
assert.equal(Filter.describe(narrow), string);
|
||||
|
||||
narrow = [
|
||||
{operator: 'is', operand: 'mentioned'}
|
||||
];
|
||||
string = 'Narrow to mentioned messages';
|
||||
assert.equal(Filter.describe(narrow), string);
|
||||
|
||||
narrow = [
|
||||
{operator: 'is', operand: 'alerted'}
|
||||
];
|
||||
string = 'Narrow to alerted messages';
|
||||
assert.equal(Filter.describe(narrow), string);
|
||||
|
||||
narrow = [
|
||||
{operator: 'is', operand: 'something_we_do_not_support'}
|
||||
];
|
||||
string = 'Narrow to (unknown operator)';
|
||||
assert.equal(Filter.describe(narrow), string);
|
||||
|
||||
narrow = [
|
||||
{operator: 'bogus', operand: 'foo'}
|
||||
];
|
||||
string = 'Narrow to (unknown operator)';
|
||||
assert.equal(Filter.describe(narrow), string);
|
||||
|
||||
narrow = [
|
||||
{operator: 'stream', operand: 'devel'},
|
||||
{operator: 'topic', operand: 'JS', negated: true}
|
||||
|
||||
Reference in New Issue
Block a user