From ad540dac3ad1e7e36ffd1a81d5f66141d36ccbec Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 19 Feb 2021 21:27:11 -0800 Subject: [PATCH] puppeteer_lib: Supply missing $eval arugment. Signed-off-by: Anders Kaseorg --- frontend_tests/puppeteer_lib/common.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend_tests/puppeteer_lib/common.js b/frontend_tests/puppeteer_lib/common.js index cdf6f8829f..2711ef36e3 100644 --- a/frontend_tests/puppeteer_lib/common.js +++ b/frontend_tests/puppeteer_lib/common.js @@ -117,11 +117,15 @@ class CommonUtils { const name_selector = `${form_selector} [name="${name}"]`; const value = params[name]; if (typeof value === "boolean") { - await page.$eval(name_selector, (el, value) => { - if (el.checked !== value) { - el.click(); - } - }); + await page.$eval( + name_selector, + (el, value) => { + if (el.checked !== value) { + el.click(); + } + }, + value, + ); } else if (await is_dropdown(page, name)) { await page.select(name_selector, params[name]); } else {