mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 17:14:02 +00:00
buddy list: Rename user_presences to buddy-list-users-matching-view.
This switches to our preferred dash-separated classnames instead of underscore-separated, and also updates the classname to be differentiable from users that aren't part of the current narrow. Until the next commit that splits the buddy list, the name is a bit inaccurate since it still contains all the users.
This commit is contained in:
@@ -395,21 +395,24 @@ async function test_stream_search_filters_stream_list(page: Page): Promise<void>
|
||||
async function test_users_search(page: Page): Promise<void> {
|
||||
console.log("Search users using right sidebar");
|
||||
async function assert_in_list(page: Page, name: string): Promise<void> {
|
||||
await page.waitForSelector(`#user_presences li [data-name="${CSS.escape(name)}"]`, {
|
||||
visible: true,
|
||||
});
|
||||
await page.waitForSelector(
|
||||
`#buddy-list-users-matching-view li [data-name="${CSS.escape(name)}"]`,
|
||||
{
|
||||
visible: true,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
async function assert_selected(page: Page, name: string): Promise<void> {
|
||||
await page.waitForSelector(
|
||||
`#user_presences li.highlighted_user [data-name="${CSS.escape(name)}"]`,
|
||||
`#buddy-list-users-matching-view li.highlighted_user [data-name="${CSS.escape(name)}"]`,
|
||||
{visible: true},
|
||||
);
|
||||
}
|
||||
|
||||
async function assert_not_selected(page: Page, name: string): Promise<void> {
|
||||
await page.waitForSelector(
|
||||
`#user_presences li.highlighted_user [data-name="${CSS.escape(name)}"]`,
|
||||
`#buddy-list-users-matching-view li.highlighted_user [data-name="${CSS.escape(name)}"]`,
|
||||
{hidden: true},
|
||||
);
|
||||
}
|
||||
@@ -421,7 +424,9 @@ async function test_users_search(page: Page): Promise<void> {
|
||||
|
||||
// Enter the search box and test selected suggestion navigation
|
||||
await page.click("#user_filter_icon");
|
||||
await page.waitForSelector("#user_presences .highlighted_user", {visible: true});
|
||||
await page.waitForSelector("#buddy-list-users-matching-view .highlighted_user", {
|
||||
visible: true,
|
||||
});
|
||||
await assert_selected(page, "Desdemona");
|
||||
await assert_not_selected(page, "Cordelia, Lear's daughter");
|
||||
await assert_not_selected(page, "King Hamlet");
|
||||
@@ -443,9 +448,12 @@ async function test_users_search(page: Page): Promise<void> {
|
||||
await arrow(page, "Down");
|
||||
|
||||
// Now Iago must be highlighted
|
||||
await page.waitForSelector('#user_presences li.highlighted_user [data-name="Iago"]', {
|
||||
visible: true,
|
||||
});
|
||||
await page.waitForSelector(
|
||||
'#buddy-list-users-matching-view li.highlighted_user [data-name="Iago"]',
|
||||
{
|
||||
visible: true,
|
||||
},
|
||||
);
|
||||
await assert_not_selected(page, "King Hamlet");
|
||||
await assert_not_selected(page, "aaron");
|
||||
await assert_not_selected(page, "Desdemona");
|
||||
|
||||
Reference in New Issue
Block a user