25 lines
853 B
TypeScript
25 lines
853 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
import { E2E_BACKEND_URL } from '../playwright.config';
|
|
|
|
test.describe('Basic E2E Tests', () => {
|
|
test('backend health check', async ({ request }) => {
|
|
const response = await request.get(`${E2E_BACKEND_URL}/api/health`);
|
|
expect(response.ok()).toBeTruthy();
|
|
const body = await response.json();
|
|
expect(body.status).toBe('ok');
|
|
expect(body.service).toBe('spiceflow');
|
|
});
|
|
|
|
test('frontend loads', async ({ page }) => {
|
|
await page.goto('/');
|
|
await expect(page).toHaveTitle(/Spiceflow/i);
|
|
});
|
|
|
|
test('sessions list loads empty', async ({ request }) => {
|
|
const response = await request.get(`${E2E_BACKEND_URL}/api/sessions`);
|
|
expect(response.ok()).toBeTruthy();
|
|
const sessions = await response.json();
|
|
expect(Array.isArray(sessions)).toBeTruthy();
|
|
});
|
|
});
|