From 97e3015ec1265ef997567f9094d9a29612377f79 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Fri, 10 May 2024 17:30:33 +0000 Subject: [PATCH] stars: Fix flaky test due to message list not yet rendered. With combined feed no longer cached, this test became flaky as it took longer for combined feed to load. Verified that other tests waiting on `.message-list` don't need this change. --- web/e2e-tests/stars.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/e2e-tests/stars.test.ts b/web/e2e-tests/stars.test.ts index b3b8d026ba..c48d9ba1a4 100644 --- a/web/e2e-tests/stars.test.ts +++ b/web/e2e-tests/stars.test.ts @@ -34,7 +34,11 @@ async function test_narrow_to_starred_messages(page: Page): Promise { // Go back to the combined feed view. await page.click("#left-sidebar-navigation-list .top_left_all_messages"); - await page.waitForSelector(".message-list .message_row", {visible: true}); + const combined_feed_id = await common.get_current_msg_list_id(page, true); + await page.waitForSelector( + `.message-list[data-message-list-id='${combined_feed_id}'] .message_row`, + {visible: true}, + ); } async function stars_test(page: Page): Promise {