This project includes comprehensive end-to-end tests using Playwright to ensure the application works correctly from a user's perspective.
- Make sure you have Node.js installed (version 18+)
- Install project dependencies:
pnpm install - Start your application - The tests expect the app to be running on
http://localhost:3000- For local development:
pnpm run dev - For Docker:
pnpm run quickstartordocker compose up - For production:
pnpm run start
- For local development:
# Run tests in default mode (browser visible in non-CI environments)
pnpm test:e2e
# Run tests with browser visible (explicit headed mode)
pnpm test:e2e:headed
# Run tests with Playwright UI
pnpm test:e2e:ui
# Run tests in debug mode
pnpm test:e2e:debug
# Run tests in headless mode
pnpm test:e2e:headless# Navigate to e2e-tests directory
cd tests/e2e
# Run tests in default mode (browser visible in non-CI environments)
npm test
# Run tests with browser visible (explicit headed mode)
npm test:headed
# Run tests with Playwright UI
npm run test:ui
# Run tests in debug mode
npm run test:debug
# Run tests in headless mode, without visible browser
npm run test:headlessImportant: Make sure your application is running before executing the tests!
The main test (user-onboarding-flow.spec.ts) follows this complete user journey:
- Navigate to Application - Opens the base URL (default: http://localhost:3000)
- Handle Telemetry Consent - If the telemetry consent page appears, clicks "Decline"
- Connect Sample Database - If the data source connection page appears, clicks "Connect" for the sample database
- Submit Message - On the homepage, enters "Build hello world application with Hello World! h1 title" and submits
- The Chat Loads, Generates the App and Runs it - The chat and the preview load, eventually the built app starts running in the preview
BASE_URL: The base URL of your application (defaults tohttp://localhost:3000)CI: Set totruein CI environments to enable retries and headless mode
- Browser: Chromium with headless mode disabled (browser window visible)
- Viewport: Desktop Chrome resolution
- Screenshots: Automatically taken on failures
- Videos: Recorded on every test run
- Web Server: Manual - You must start your application before running tests