gadget/gadget-code/tests/e2e/auth.test.ts
Rob Colbert 11bdd5e3b0 make reasoning effort configurable; remove sign up concept
- Implemented reasoning effort setting in SESSION panel of Chat Sessio
View
- Removed all ability to "sign up" for an account
2026-05-08 11:40:30 -04:00

38 lines
1.4 KiB
TypeScript

import { chromium, test, expect } from '@playwright/test';
test.describe('Authentication Flow', () => {
test('should sign in and show authenticated home', async ({ page }) => {
await page.goto('https://code-dev.g4dge7.com:5174/sign-in');
await page.waitForLoadState('networkidle');
await page.fill('#email', 'rob@digitaltelepresence.com');
await page.fill('#password', 'ionfrali');
await page.click('button[type="submit"]');
await page.waitForTimeout(3000);
const userData = await page.evaluate(() => localStorage.getItem('dtp_user'));
expect(userData).toBeDefined();
const content = await page.content();
expect(content).toContain('Welcome');
expect(content).toContain('Rob Colbert');
});
test('should sign out and show unauthenticated home', async ({ page }) => {
await page.goto('https://code-dev.g4dge7.com:5174/sign-in');
await page.waitForLoadState('networkidle');
await page.fill('#email', 'rob@digitaltelepresence.com');
await page.fill('#password', 'ionfrali');
await page.click('button[type="submit"]');
await page.waitForTimeout(2000);
await page.click('button:has-text("Sign Out")');
await page.waitForTimeout(2000);
const userData = await page.evaluate(() => localStorage.getItem('dtp_user'));
expect(userData).toBeNull();
const content = await page.content();
expect(content).toContain('Sign In');
});
});