mirror of https://github.com/zulip/zulip.git
left sidebar: Clicking on a stream clears the stream search.
Clears and hides the search bar when a stream is selected from the filtered stream list. Fixes: #7909.
This commit is contained in:
parent
0f99610478
commit
53e4dc1a46
|
@ -365,6 +365,23 @@ casper.waitForSelector('.input-append.notdisplayed', function () {
|
|||
casper.test.assertExists('.input-append.notdisplayed', 'Stream filter box not visible after second click');
|
||||
});
|
||||
|
||||
// We search for the beginning of "Verona", not case sensitive
|
||||
casper.then(function () {
|
||||
casper.evaluate(function () {
|
||||
$('.stream-list-filter').expectOne()
|
||||
.focus()
|
||||
.val('ver')
|
||||
.trigger($.Event('input'));
|
||||
});
|
||||
});
|
||||
|
||||
casper.waitWhileVisible('#stream_filters [data-stream-name="Denmark"]', function () {
|
||||
// Clicking the narrowed list should clear the search
|
||||
casper.click('#stream_filters [data-stream-name="Verona"] a');
|
||||
expect_stream();
|
||||
casper.test.assertEquals(casper.fetchText('.stream-list-filter'), '', 'Clicking on a stream clears the search');
|
||||
});
|
||||
|
||||
un_narrow();
|
||||
|
||||
common.then_log_out();
|
||||
|
|
|
@ -472,6 +472,8 @@ exports.initialize = function () {
|
|||
popovers.hide_all();
|
||||
narrow.by('stream', sub.name, {select_first_unread: true, trigger: 'sidebar'});
|
||||
|
||||
exports.clear_and_hide_search();
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue