Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
web-e2e-tests: Update references to "private message" and "PM".
Lauryn Menard7c47616ffa90
diff --git a/web/e2e-tests/compose.test.ts b/web/e2e-tests/compose.test.tsindex 2cccebfae8c..b75a48e9c0b 100644--- a/web/e2e-tests/compose.test.ts+++ b/web/e2e-tests/compose.test.ts@@ -32,7 +32,7 @@ async function test_send_messages(page: Page): Promise<void> {await common.send_multiple_messages(page, [{stream: "Verona", topic: "Reply test", content: "Compose stream reply test"},- {recipient: "[email protected]", content: "Compose private message reply test"},+ {recipient: "[email protected]", content: "Compose direct message reply test"},]);assert.equal((await page.$$("#zhome .message_row")).length, initial_msgs_count + 2);@@ -74,9 +74,7 @@ async function test_reply_by_click_prepopulates_stream_topic_names(page: Page):async function test_reply_by_click_prepopulates_private_message_recipient(page: Page,): Promise<void> {- const private_message = await page.$(- get_message_selector("Compose private message reply test"),- );+ const private_message = await page.$(get_message_selector("Compose direct message reply test"));assert.ok(private_message !== null);await private_message.click();await page.waitForSelector("#private_message_recipient", {visible: true});diff --git a/web/e2e-tests/drafts.test.ts b/web/e2e-tests/drafts.test.tsindex 891d0703f29..1eec58f1577 100644--- a/web/e2e-tests/drafts.test.ts+++ b/web/e2e-tests/drafts.test.ts@@ -44,10 +44,10 @@ async function create_stream_message_draft(page: Page): Promise<void> {}async function create_private_message_draft(page: Page): Promise<void> {- console.log("Creating private message draft");+ console.log("Creating direct message draft");await page.keyboard.press("KeyX");await page.waitForSelector("#private_message_recipient", {visible: true});- await common.fill_form(page, "form#send_message_form", {content: "Test private message."});+ await common.fill_form(page, "form#send_message_form", {content: "Test direct message."});await common.pm_recipient.set(page, "[email protected]");await common.pm_recipient.set(page, "[email protected]");await page.click("#compose_close");@@ -92,7 +92,7 @@ async function test_previously_created_drafts_rendered(page: Page): Promise<voidpage,".draft-row:nth-last-child(2) .rendered_markdown.restore-draft",),- "Test private message.",+ "Test direct message.",);assert.strictEqual(await common.get_text_from_selector(@@ -166,12 +166,12 @@ async function test_edited_draft_message(page: Page): Promise<void> {}async function test_restore_private_message_draft_via_draft_overlay(page: Page): Promise<void> {- console.log("Restoring private message draft.");+ console.log("Restoring direct message draft.");await page.click(".message_row.private-message .restore-draft");await wait_for_drafts_to_disappear(page);await page.waitForSelector("#compose-direct-recipient", {visible: true});await common.check_compose_state(page, {- content: "Test private message.",+ content: "Test direct message.",});const cordelia_internal_email = await common.get_internal_email_from_name(page, "cordelia");const hamlet_internal_email = await common.get_internal_email_from_name(page, "hamlet");@@ -179,7 +179,7 @@ async function test_restore_private_message_draft_via_draft_overlay(page: Page):assert.strictEqual(await common.get_text_from_selector(page, "title"),"Cordelia, Lear's daughter, King Hamlet - Zulip Dev - Zulip",- "Didn't narrow to the private messages with cordelia and hamlet",+ "Didn't narrow to the direct messages with cordelia and hamlet",);await page.click("#compose_close");}@@ -203,12 +203,12 @@ async function test_save_draft_by_reloading(page: Page): Promise<void> {await page.keyboard.press("KeyX");await page.waitForSelector("#compose-direct-recipient", {visible: true});await common.fill_form(page, "form#send_message_form", {- content: "Test private message draft.",+ content: "Test direct message draft.",});await common.pm_recipient.set(page, "[email protected]");await page.reload();- // Reloading into a private messages narrow opens compose box.+ // Reloading into a direct messages narrow opens compose box.await page.waitForSelector("#compose-textarea", {visible: true});await page.click("#compose_close");@@ -232,7 +232,7 @@ async function test_save_draft_by_reloading(page: Page): Promise<void> {page,".draft-row:nth-last-child(2) .rendered_markdown.restore-draft",),- "Test private message draft.",+ "Test direct message draft.",);}diff --git a/web/e2e-tests/lib/common.ts b/web/e2e-tests/lib/common.tsindex d9d2cf21312..6b073bc23ed 100644--- a/web/e2e-tests/lib/common.ts+++ b/web/e2e-tests/lib/common.ts@@ -34,7 +34,7 @@ export const pm_recipient = {// We use [style*="display: block"] here to distinguish// the visible typeahead menu from the invisible ones- // meant for something else; e.g., the private message+ // meant for something else; e.g., the direct message// input typeahead is different from the topic input// typeahead but both can be present in the DOM.const entry = await page.waitForSelector('.typeahead[style*="display: block"] .active a', {@@ -488,8 +488,9 @@ export async function get_rendered_messages(topic_label === null ? "" : (await get_element_text(topic_label)).trim();let key = stream_name;if (topic_name !== "") {- // If topic_name is '' then this is PMs, so only- // append > topic_name if we are not in PMs or Group PMs.+ // If topic_name is '', then this is direct messages, so only+ // append > topic_name if we are not in 1:1 or group direct+ // messages.key = `${stream_name} > ${topic_name}`;}diff --git a/web/e2e-tests/navigation.test.ts b/web/e2e-tests/navigation.test.tsindex bf7ee6ea043..ac16cd1ffea 100644--- a/web/e2e-tests/navigation.test.ts+++ b/web/e2e-tests/navigation.test.ts@@ -54,7 +54,7 @@ async function navigate_to_subscriptions(page: Page): Promise<void> {}async function navigate_to_private_messages(page: Page): Promise<void> {- console.log("Navigate to private messages");+ console.log("Navigate to direct messages");const all_private_messages_icon = "#show_all_private_messages";await page.waitForSelector(all_private_messages_icon, {visible: true});diff --git a/web/e2e-tests/settings.test.ts b/web/e2e-tests/settings.test.tsindex e315b18327e..a2aa4629e00 100644--- a/web/e2e-tests/settings.test.ts+++ b/web/e2e-tests/settings.test.ts@@ -420,7 +420,7 @@ async function test_default_language_setting(page: Page): Promise<void> {async function test_notifications_section(page: Page): Promise<void> {await page.click('[data-section="notifications"]');- // At the beginning, "PMs, mentions, and alerts"(checkbox name=enable_sounds) audio will be on+ // At the beginning, "DMs, mentions, and alerts"(checkbox name=enable_sounds) audio will be on// and "Streams"(checkbox name=enable_stream_audible_notifications) audio will be off by default.const notification_sound_enabled =