mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 19:13:53 +00:00
search: Use pills in the search bar.
This initial commit is fairly bare-bones, and does not have the full contemplated functionality.
This commit is contained in:
@@ -179,7 +179,11 @@ async function search_and_check(
|
||||
): Promise<void> {
|
||||
await page.click(".search_icon");
|
||||
await page.waitForSelector(".navbar-search.expanded", {visible: true});
|
||||
// Close the "in: home" pill
|
||||
await page.click(".navbar-search .pill-close-button");
|
||||
await common.select_item_via_typeahead(page, "#search_query", search_str, item_to_select);
|
||||
// Enter to trigger search
|
||||
await page.keyboard.press("Enter");
|
||||
await check(page);
|
||||
assert.strictEqual(await page.title(), expected_narrow_title);
|
||||
await un_narrow(page);
|
||||
@@ -189,7 +193,11 @@ async function search_and_check(
|
||||
async function search_silent_user(page: Page, str: string, item: string): Promise<void> {
|
||||
await page.click(".search_icon");
|
||||
await page.waitForSelector(".navbar-search.expanded", {visible: true});
|
||||
// Close the "in: home" pill
|
||||
await page.click(".navbar-search .pill-close-button");
|
||||
await common.select_item_via_typeahead(page, "#search_query", str, item);
|
||||
// Enter to trigger search
|
||||
await page.keyboard.press("Enter");
|
||||
await page.waitForSelector(".empty_feed_notice", {visible: true});
|
||||
const expect_message = "You haven't received any messages sent by Email Gateway yet.";
|
||||
assert.strictEqual(
|
||||
@@ -224,7 +232,11 @@ async function expect_non_existing_users(page: Page): Promise<void> {
|
||||
async function search_non_existing_user(page: Page, str: string, item: string): Promise<void> {
|
||||
await page.click(".search_icon");
|
||||
await page.waitForSelector(".navbar-search.expanded", {visible: true});
|
||||
// Close the "in: home" pill
|
||||
await page.click(".navbar-search .pill-close-button");
|
||||
await common.select_item_via_typeahead(page, "#search_query", str, item);
|
||||
// Enter to trigger search
|
||||
await page.keyboard.press("Enter");
|
||||
await expect_non_existing_user(page);
|
||||
await un_narrow(page);
|
||||
await expect_home(page);
|
||||
|
||||
Reference in New Issue
Block a user