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
12.0s
AI-created test cases
What the AI planned
Jun 29, 4:37 PM
Successful login with valid credentials
happy
- Verify the URL redirects to the dashboard page
- Verify the dashboard welcome message or header is visible
Login failure with invalid password
negative
- Verify an error message indicating invalid credentials is displayed
- Verify the URL remains on the login page
Login form validation - empty fields
edge
- Verify HTML5 validation or custom error messages appear for required fields
Generated Playwright
generated.spec.ts
import { test, expect } from '@playwright/test';
test.describe('story-001: Login functionality', () => {
test.beforeEach(async ({ page }) => {
await page.goto('https://qa-demo-bank.vercel.app/login');
});
test('TC-001: Successful login with valid credentials', async ({ page }) => {
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: Login failure with invalid password', async ({ page }) => {
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: Login form validation - empty fields', async ({ page }) => {
await expect(page.getByLabel('Email address')).toBeRequired();
await expect(page.getByLabel('Password')).toBeRequired();
await page.getByTestId('login-submit').click();
await expect(page).toHaveURL(/.*\/login/);
});
});