e2e-tests: Fix TypeScript noUncheckedIndexedAccess errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-05-30 10:11:12 -07:00
parent ed5f1455f2
commit 94f0f9340c
1 changed files with 1 additions and 2 deletions

View File

@ -139,8 +139,7 @@ export async function fill_form(
async function is_dropdown(page: Page, name: string): Promise<boolean> { async function is_dropdown(page: Page, name: string): Promise<boolean> {
return (await page.$(`select[name="${CSS.escape(name)}"]`)) !== null; return (await page.$(`select[name="${CSS.escape(name)}"]`)) !== null;
} }
for (const name of Object.keys(params)) { for (const [name, value] of Object.entries(params)) {
const value = params[name];
if (typeof value === "boolean") { if (typeof value === "boolean") {
await page.$eval( await page.$eval(
`${form_selector} input[name="${CSS.escape(name)}"]`, `${form_selector} input[name="${CSS.escape(name)}"]`,