Sign in and reach the account dashboard
import { test, expect } from '@playwright/test';
test.use({ storageState: { cookies: [], origins: [] } });
test('account dashboard access', async ({ page }) => {
const email = process.env.QA_EMAIL ?? '';
const password = process.env.QA_PASSWORD ?? '';
expect(email).not.toBe('');
expect(password).not.toBe('');
await page.goto('/login');
await page.getByLabel('Email', { exact: true }).fill(email);
await page.getByLabel('Password', { exact: true }).fill(password);
await page.getByRole('button', { name: 'Sign in', exact: true }).click();
await expect(page).toHaveURL(/\/dashboard$/);
await expect(page.getByRole('button', { name: 'Account menu' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Recent activity' })).toBeVisible();
await expect(page.getByTestId('login-error')).toBeHidden();
});Illustrative Playwright TypeScript spec using @playwright/test. Configure baseURL and supply QA_EMAIL and QA_PASSWORD through your test environment. The example account uses password login without an authenticator challenge. Source · checked 2026-10-23.
Name: Account dashboard access Starting path: /login Environment: Staging Instructions: Sign in with the saved QA login and open the account dashboard. Expected: The account menu and recent activity are visible. A sign-in error or unresolved login challenge does not pass.
Save the account as an environment login instead of pasting credentials into What to test. When the sign-in challenge itself is under test, select Start logged out under Options, or leave Reuse login sessions off on the login. Session reuse is off by default. If your actual flow uses an authenticator, save its setup key and include that challenge in the scenario. The benchmark below did not complete sign-in.
The run ended with an Error status, which our benchmark scores as cannot verify: the security check failed and no credentials were supplied. It illustrates an unresolved login prerequisite, not a successful sign-in or proof that your authentication will work.