test: finalize all E2E specs (auth/dashboard/clients/invoices/payments/tickets/leads/remittances/reports/settings/audit-log)
This commit is contained in:
@@ -11,27 +11,23 @@ test.describe('Settings', () => {
|
||||
await expect(page.locator('h1:has-text("Settings")')).toBeVisible();
|
||||
});
|
||||
|
||||
test('tenant section loads org info', async ({ page }) => {
|
||||
await page.waitForTimeout(3000);
|
||||
// Should show tenant fields like name, address
|
||||
await expect(page.locator('text=Tenant, text=Organization').first()).toBeVisible({ timeout: 10000 });
|
||||
test('tenant settings section visible', async ({ page }) => {
|
||||
await page.waitForTimeout(2000);
|
||||
await expect(page.locator('text=Tenant, text=Organization, text=ISP Name').first()).toBeVisible();
|
||||
});
|
||||
|
||||
test('billing settings section visible', async ({ page }) => {
|
||||
await page.waitForTimeout(2000);
|
||||
await expect(page.locator('text=Billing').first()).toBeVisible();
|
||||
});
|
||||
|
||||
test('users section visible to admin', async ({ page }) => {
|
||||
await page.waitForTimeout(2000);
|
||||
const usersSection = page.locator('text=Users');
|
||||
await expect(usersSection).toBeVisible({ timeout: 10000 }).catch(() => {});
|
||||
await expect(page.locator('text=Users')).toBeVisible();
|
||||
});
|
||||
|
||||
test('no crash when switching sections', async ({ page }) => {
|
||||
await page.waitForTimeout(2000);
|
||||
// Click through tab/section buttons
|
||||
const tabs = page.locator('button:has-text("Billing"), button:has-text("Areas"), button:has-text("Plans")');
|
||||
const count = await tabs.count();
|
||||
if (count > 0) {
|
||||
await tabs.first().click();
|
||||
await page.waitForTimeout(500);
|
||||
}
|
||||
test('settings page does not crash', async ({ page }) => {
|
||||
await page.waitForTimeout(4000);
|
||||
await expect(page.locator('h1:has-text("Settings")')).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user