Back to saved runs
Saved run detail
As Alex, I want to log in with my email and password so that I can see my account dashboard.
Needs review
Execution failed.
View GitHub runReady
0
Failed
2
Test cases
2
Duration
18.5s
AI-created test cases
What the AI planned
Jun 22, 9:54 PM
Successful login with valid credentials
happy
- Expected URL to contain '/dashboard'
- Expected dashboard welcome message to be visible
Login fails with invalid password
negative
- Expected error message 'Invalid credentials' to be visible
- Expected URL to remain '/login'
Generated Playwright
generated.spec.ts
import { test, expect } from '@playwright/test';
test('TC-001: Successful login with valid credentials', async ({ page }) => {
await page.goto('https://qa-demo-bank.vercel.app/login');
await page.getByLabel('Email address').fill('alex.rivera@qademobank.test');
await page.getByLabel('Password').fill('demo-password');
await page.getByRole('button', { name: 'Continue' }).click();
await expect(page).toHaveURL(/.*\/dashboard/);
await expect(page.getByRole('heading', { name: /welcome/i })).toBeVisible();
});
test('TC-002: Login fails with invalid password', async ({ page }) => {
await page.goto('https://qa-demo-bank.vercel.app/login');
await page.getByLabel('Email address').fill('alex.rivera@qademobank.test');
await page.getByLabel('Password').fill('wrong-password');
await page.getByRole('button', { name: 'Continue' }).click();
const errorAlert = page.getByTestId('login-error');
await expect(errorAlert).toBeVisible();
await expect(errorAlert).toContainText('Invalid credentials');
await expect(page).toHaveURL(/.*\/login/);
});