mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Search menu results does not refresh when search context is changed.
This commit is contained in:
@@ -47,3 +47,29 @@ test("search scope checkbox", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("Search with context", assert => {
|
||||
visit("/t/internationalization-localization/280/1");
|
||||
|
||||
click('#search-button');
|
||||
fillIn('#search-term', 'dev');
|
||||
click(".search-context input[type='checkbox']");
|
||||
keyEvent('#search-term', 'keyup', 16);
|
||||
|
||||
andThen(() => {
|
||||
assert.ok(exists('.search-menu .results ul li'), 'it shows results');
|
||||
});
|
||||
|
||||
visit("/");
|
||||
click('#search-button');
|
||||
|
||||
andThen(() => {
|
||||
assert.ok(!exists(".search-context input[type='checkbox']"));
|
||||
});
|
||||
|
||||
visit("/t/internationalization-localization/280/1");
|
||||
click('#search-button');
|
||||
|
||||
andThen(() => {
|
||||
assert.ok(!$('.search-context input[type=checkbox]').is(":checked"));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user