Code QuizAdvanced

Playwright Login Test Bug

Spot the common async mistake in a basic Playwright UI automation test.

Codejavascript
const { test, expect } = require('@playwright/test');

test('user can open login page', async ({ page }) => {
  page.goto('https://example.com/login');
  await page.fill('#username', 'alice');
  await page.fill('#password', 'secret');
  await page.click('#submit');
  await expect(page).toHaveURL(/dashboard/);
});

What is the bug in this Playwright test?