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
1
Test cases
3
Duration
11.8s
AI-created test cases
What the AI planned
Jun 24, 3:03 AM
Successful login with valid credentials
happy
- Expect the URL to contain '/dashboard'
- Expect the dashboard header 'Welcome, Alex Rivera' to be visible
Failed login with incorrect password
negative
- Expect an error message 'Invalid email or password' to be visible
- Expect the URL to remain '/login'
Validation errors on empty form submission
edge
- Expect 'Email is required' validation message to be visible
- Expect 'Password is required' validation message to be visible
Generated Playwright
generated.spec.ts
import { test, expect } from '@playwright/test';
test.describe('story-001: Login Flow', () => {
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.getByTestId('login-submit').click();
await expect(page).toHaveURL(/\/dashboard/);
await expect(page.getByRole('heading', { name: 'Dashboard', exact: true })).toBeVisible();
});
test('TC-002: Failed login with incorrect 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.getByTestId('login-submit').click();
await expect(page.getByTestId('login-error')).toHaveText('Invalid demo credentials.');
await expect(page).toHaveURL(/\/login/);
});
test('TC-003: Validation errors on empty form submission', async ({ page }) => {
await page.goto('https://qa-demo-bank.vercel.app/login');
await page.getByTestId('login-submit').click();
await expect(page.getByText('Email is required')).toBeVisible();
await expect(page.getByText('Password is required')).toBeVisible();
});
});