diff --git a/web/e2e-tests/delete-message.test.ts b/web/e2e-tests/delete-message.test.ts index e1fc893f23..cce87af7ec 100644 --- a/web/e2e-tests/delete-message.test.ts +++ b/web/e2e-tests/delete-message.test.ts @@ -29,7 +29,7 @@ async function delete_message_test(page: Page): Promise { await common.wait_for_micromodal_to_open(page); await page.evaluate(() => { - (document.querySelector(".dialog_submit_button") as HTMLButtonElement)?.click(); + document.querySelector(".dialog_submit_button")?.click(); }); await common.wait_for_micromodal_to_close(page); diff --git a/web/e2e-tests/user-status.test.ts b/web/e2e-tests/user-status.test.ts index 2de5a83d58..4f34930562 100644 --- a/web/e2e-tests/user-status.test.ts +++ b/web/e2e-tests/user-status.test.ts @@ -21,7 +21,7 @@ async function open_set_user_status_modal(page: Page): Promise { await page.waitForSelector(".user_popover", {visible: true}); // We are using evaluate to click because it is very hard to detect if the user info popover has opened. await page.evaluate(() => - (document.querySelector(".update_status_text") as HTMLAnchorElement)!.click(), + document.querySelector(".update_status_text")!.click(), ); // Wait for the modal to completely open. @@ -33,7 +33,7 @@ async function test_user_status(page: Page): Promise { // Check by clicking on common statues. await page.click(".user-status-value:nth-child(2)"); await page.waitForFunction( - () => (document.querySelector(".user-status") as HTMLInputElement).value === "In a meeting", + () => document.querySelector(".user-status")!.value === "In a meeting", ); // It should select calendar emoji. await page.waitForSelector(".selected-emoji.emoji-1f4c5"); @@ -41,7 +41,7 @@ async function test_user_status(page: Page): Promise { // Clear everything. await page.click("#clear_status_message_button"); await page.waitForFunction( - () => (document.querySelector(".user-status") as HTMLInputElement).value === "", + () => document.querySelector(".user-status")!.value === "", ); await page.waitForSelector(".status-emoji-wrapper .smiley-icon", {visible: true});