Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

room-feed e2e: close the thread panel with a DOM click and wait for it to go

milind-soni17a1ace3fd6e
diff --git a/scripts/testing/room-feed-ui.e2e.test.ts b/scripts/testing/room-feed-ui.e2e.test.ts
index c071ccfd34..6b1c82e0b6 100644
--- a/scripts/testing/room-feed-ui.e2e.test.ts
+++ b/scripts/testing/room-feed-ui.e2e.test.ts
@@ -115,7 +115,8 @@ async function until<T>(probe: () => Promise<T> | T, what: string, timeoutMs = 3
await revisitRoom();
await until(() => evaluate(`Boolean(document.querySelector('[data-thread-panel="${opened}"]'))`), "the last viewed thread beside the feed");
expect(await current()).toBe(room.threadId);
- await browse("click", "[data-thread-panel] button[aria-label='Close thread']");
+ await evaluate("document.querySelector(`[data-thread-panel] button[aria-label='Close thread']`).click(); true");
+ await until(() => evaluate("!document.querySelector('[data-thread-panel]')"), "the thread panel to close");
await revisitRoom();
expect(await evaluate("Boolean(document.querySelector('[data-thread-panel]'))")).toBe(false);