From b51ffa0590b1468cbeece7e87fee662f46430a67 Mon Sep 17 00:00:00 2001 From: Brian Donovan <1938+eventualbuddha@users.noreply.github.com> Date: Mon, 24 Jul 2023 09:36:16 -0700 Subject: [PATCH] fix(playwright): remove unnecessary `await`s (#1239) `page.locator` is a synchronous method. --- playwright-tests/fullstack.spec.js | 4 ++-- playwright-tests/web.spec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/playwright-tests/fullstack.spec.js b/playwright-tests/fullstack.spec.js index dd16c9b93..2ddd72b47 100644 --- a/playwright-tests/fullstack.spec.js +++ b/playwright-tests/fullstack.spec.js @@ -9,7 +9,7 @@ test('button click', async ({ page }) => { await expect(main).toContainText('hello axum! 12345'); // Click the increment button. - let button = await page.locator('button.increment-button'); + let button = page.locator('button.increment-button'); await button.click(); // Expect the page to contain the updated counter text. @@ -24,7 +24,7 @@ test('fullstack communication', async ({ page }) => { await expect(main).toContainText('Server said: ...'); // Click the increment button. - let button = await page.locator('button.server-button'); + let button = page.locator('button.server-button'); await button.click(); // Expect the page to contain the updated counter text. diff --git a/playwright-tests/web.spec.js b/playwright-tests/web.spec.js index 529a7e0e0..aa1a89736 100644 --- a/playwright-tests/web.spec.js +++ b/playwright-tests/web.spec.js @@ -9,7 +9,7 @@ test('button click', async ({ page }) => { await expect(main).toContainText('hello axum! 0'); // Click the increment button. - let button = await page.locator('button.increment-button'); + let button = page.locator('button.increment-button'); await button.click(); // Expect the page to contain the updated counter text. @@ -80,7 +80,7 @@ test('eval', async ({ page }) => { await expect(div).toHaveText(''); // Click the button to run the eval. - let button = await page.locator('button.eval-button'); + let button = page.locator('button.eval-button'); await button.click(); // Check that the title changed.