Back to saved runs
Saved run detail
As an admin, I want to access the audit log so that I can review user activity.
Needs review
Execution failed.
View GitHub runReady
0
Failed
2
Test cases
2
Duration
14.4s
AI-created test cases
What the AI planned
Jun 24, 12:54 AM
Verify admin can navigate to and view the Audit Log
happy
- URL should contain '/audit-log'
- Audit Log header should be visible
- Audit Log table should display at least one user activity record
Verify admin can filter audit logs by search query
happy
- All displayed rows in the Audit Log table match the search query
- No unrelated records are visible in the table
Generated Playwright
generated.spec.ts
import { test, expect } from '@playwright/test';
test.beforeEach(async ({ page }) => {
await page.goto('https://qa-demo-bank.vercel.app/login');
await page.getByLabel('Email address').fill('admin.alex@qademobank.test');
await page.getByLabel('Password').fill('demo-password-admin');
await page.getByRole('button', { name: 'Continue' }).click();
await expect(page).toHaveURL(/.*\/dashboard/);
await expect(page.getByRole('heading', { name: 'Dashboard', exact: true })).toBeVisible();
});
test('TC-001: Verify admin can navigate to and view the Audit Log', async ({ page }) => {
await page.getByRole('link', { name: 'Audit Log' }).click();
await expect(page).toHaveURL(/.*\/audit-log/);
await expect(page.getByRole('heading', { name: 'Audit Log' })).toBeVisible();
const table = page.getByRole('table');
await expect(table).toBeVisible();
const rows = table.locator('tbody tr');
await expect(rows.first()).toBeVisible();
});
test('TC-002: Verify admin can filter audit logs by search query', async ({ page }) => {
await page.goto('https://qa-demo-bank.vercel.app/audit-log');
await expect(page.getByRole('heading', { name: 'Audit Log' })).toBeVisible();
const searchInput = page.getByPlaceholder(/search/i);
await searchInput.fill('Alex');
await searchInput.press('Enter');
const rows = page.getByRole('table').locator('tbody tr');
await expect(rows.first()).toBeVisible();
const count = await rows.count();
for (let i = 0; i < count; i++) {
await expect(rows.nth(i)).toContainText('Alex');
}
});