Fix await on string

This commit is contained in:
Jannis Mattheis 2019-09-28 16:48:35 +02:00
parent 70c68a4d6f
commit 97d8837d0a
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ const enabledState = async (id: number) =>
(await page.$eval(switchSelctor(id), (el) => el.getAttribute('data-enabled'))) === 'true'; (await page.$eval(switchSelctor(id), (el) => el.getAttribute('data-enabled'))) === 'true';
const toggleEnabled = async (id: number) => { const toggleEnabled = async (id: number) => {
const origEnabled = await enabledState(id).toString(); const origEnabled = (await enabledState(id)).toString();
await page.click(switchSelctor(id)); await page.click(switchSelctor(id));
await page.waitForFunction( await page.waitForFunction(
`document.querySelector("${switchSelctor( `document.querySelector("${switchSelctor(