34 lines
1.1 KiB
TypeScript
34 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);
|
|
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);
|
|
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();
|
|
});
|
|
});
|