puppeteer_tests: Fix compose test trying to click local echoes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-09-11 15:13:48 -07:00 committed by Tim Abbott
parent ca2c0f7e21
commit 78eed03574
1 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,7 @@ async function close_compose_box(page: Page): Promise<void> {
} }
function get_message_selector(text: string): string { function get_message_selector(text: string): string {
return `xpath///p[text()='${text}'][last()]`; return `xpath/(//p[text()='${text}'])[last()]`;
} }
async function test_send_messages(page: Page): Promise<void> { async function test_send_messages(page: Page): Promise<void> {
@ -139,7 +139,9 @@ async function test_send_multirecipient_pm_from_cordelia_pm_narrow(page: Page):
const pm = await page.waitForSelector( const pm = await page.waitForSelector(
`xpath/(//*[${common.has_class_x( `xpath/(//*[${common.has_class_x(
"messagebox", "messagebox",
)} and contains(normalize-space(), "${multiple_recipients_pm}")])[last()]`, )} and contains(normalize-space(), "${multiple_recipients_pm}") and count(.//*[${common.has_class_x(
"star",
)}])>0])[last()]`,
); );
assert.ok(pm !== null); assert.ok(pm !== null);
await pm.click(); await pm.click();