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:
30
e2e/remittances.spec.ts
Normal file
30
e2e/remittances.spec.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { login } from './helpers/auth';
|
||||
|
||||
test.describe('Remittances', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await login(page);
|
||||
await page.goto('/remittances');
|
||||
});
|
||||
|
||||
test('remittances page renders', async ({ page }) => {
|
||||
await expect(page.locator('h1:has-text("Remittances")')).toBeVisible();
|
||||
await expect(page.locator('table')).toBeVisible();
|
||||
});
|
||||
|
||||
test('remittances load or show empty state', async ({ page }) => {
|
||||
await page.waitForTimeout(3000);
|
||||
const hasRows = await page.locator('tbody tr').count();
|
||||
const hasEmpty = await page.locator('text=No remittances').isVisible().catch(() => false);
|
||||
expect(hasRows > 0 || hasEmpty).toBeTruthy();
|
||||
});
|
||||
|
||||
test('Submit Remittance button opens modal', async ({ page }) => {
|
||||
const btn = page.locator('button:has-text("Submit Remittance"), button:has-text("New Remittance")').first();
|
||||
if (await btn.isVisible()) {
|
||||
await btn.click();
|
||||
await page.waitForTimeout(300);
|
||||
await expect(page.locator('text=Submit Remittance, text=Remittance').first()).toBeVisible();
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user