fix(M3-M11): clients meta pagination, client detail types, sidebar icon imports, payments error state; add E2E specs for all modules
This commit is contained in:
31
e2e/audit-log.spec.ts
Normal file
31
e2e/audit-log.spec.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { login } from './helpers/auth';
|
||||
|
||||
test.describe('Audit Log', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await login(page);
|
||||
await page.goto('/audit-log');
|
||||
});
|
||||
|
||||
test('audit log page renders', async ({ page }) => {
|
||||
await expect(page.locator('h1:has-text("Audit Log")')).toBeVisible();
|
||||
await expect(page.locator('table')).toBeVisible();
|
||||
});
|
||||
|
||||
test('audit log entries load', async ({ page }) => {
|
||||
await page.waitForTimeout(5000);
|
||||
const hasRows = await page.locator('tbody tr').count();
|
||||
const hasEmpty = await page.locator('text=No logs, text=No audit').isVisible().catch(() => false);
|
||||
expect(hasRows > 0 || hasEmpty).toBeTruthy();
|
||||
});
|
||||
|
||||
test('pagination controls work', async ({ page }) => {
|
||||
await page.waitForTimeout(3000);
|
||||
const nextBtn = page.locator('button:has-text("Next"), [aria-label="Next page"]').first();
|
||||
if (await nextBtn.isVisible() && !await nextBtn.isDisabled()) {
|
||||
await nextBtn.click();
|
||||
await page.waitForTimeout(1000);
|
||||
await expect(page.locator('h1:has-text("Audit Log")')).toBeVisible();
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user