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 run
Ready
0
Failed
2
Test cases
3
Duration
17.6s
AI-created test cases

What the AI planned

Jun 24, 12:14 AM

Successful login with valid credentials
happy
- Verify the URL changes to include '/dashboard'
- Verify the dashboard header 'Account Dashboard' is visible
- Verify the user profile name 'Alex Rivera' is displayed
Login fails with incorrect password
negative
- Verify an error message 'Invalid email or password' is displayed
- Verify the URL remains on the '/login' page
Login fields validation errors
negative
- Verify validation message 'Email is required' is visible
- Verify validation message 'Password is required' is visible
Generated Playwright

generated.spec.ts

import { test, expect } from '@playwright/test';

test.describe('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.getByRole('button', { name: 'Continue' }).click();
    
    await expect(page).toHaveURL(/.*dashboard/);
    await expect(page.getByRole('heading', { name: 'Dashboard', exact: true })).toBeVisible();
    await expect(page.getByText('Alex Rivera')).toBeVisible();
  });

  test('TC-002: Login fails 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.getByRole('button', { name: 'Continue' }).click();
    
    await expect(page.getByTestId('login-error')).toHaveText('Invalid demo credentials.');
    await expect(page).toHaveURL(/.*login/);
  });

  test('TC-003: Login fields validation errors', async ({ page }) => {
    await page.goto('https://qa-demo-bank.vercel.app/login');
    await page.getByRole('button', { name: 'Continue' }).click();
    
    await expect(page.getByText('Email is required')).toBeVisible();
    await expect(page.getByText('Password is required')).toBeVisible();
  });
});