Files
fiberops-web/e2e/settings.spec.ts

35 lines
1.1 KiB
TypeScript

import { test, expect } from '@playwright/test';
import { login } from './helpers/auth';
test.describe('Settings', () => {
test.beforeEach(async ({ page }) => {
await login(page);
await page.goto('/settings');
});
test('settings page renders', async ({ page }) => {
await expect(page.locator('h1:has-text("Settings")')).toBeVisible();
});
test('tenant settings section visible', async ({ page }) => {
await page.waitForTimeout(2000);
// Tenant tab in sidebar nav
await expect(page.locator('button:has-text("Tenant"), a:has-text("Tenant")').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);
await expect(page.locator('text=Users')).toBeVisible();
});
test('settings page does not crash', async ({ page }) => {
await page.waitForTimeout(4000);
await expect(page.locator('h1:has-text("Settings")')).toBeVisible();
});
});