Features: - Device presets (desktop, mobile, tablet, obs-overlay, all, electron) - Auth setup projects with storage state management - Cluster mode for Docker nginx multi-app routing - Multiple reporters (list, html, junit, github) - WebServer configuration for dev server management - Enhanced helpers: file upload, platform, performance, accessibility, storage - GitLab CI templates for package and consumers - Docker templates: Electron, web-only, cluster compose Breaking changes from 1.0: - Enhanced PlaywrightConfigOptions interface with new options - Exported commonDevices for device configuration access 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
/**
|
|
* Example E2E Test Template
|
|
*
|
|
* Copy to your project's e2e/ directory and customize.
|
|
*/
|
|
|
|
import { test, expect, testHelpers } from './electron';
|
|
|
|
test.describe('App Launch', () => {
|
|
test('should launch successfully', async ({ page }) => {
|
|
// Wait for app to be ready
|
|
await page.waitForSelector('[data-testid="app-layout"]', { timeout: 10000 });
|
|
await expect(page.locator('[data-testid="app-layout"]')).toBeVisible();
|
|
});
|
|
|
|
test('should display main content', async ({ page }) => {
|
|
await expect(page.locator('[data-testid="message-input"]')).toBeVisible();
|
|
});
|
|
});
|
|
|
|
test.describe('Chat Flow', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.waitForSelector('[data-testid="message-input"]', { timeout: 10000 });
|
|
});
|
|
|
|
test('should send a message', async ({ page }) => {
|
|
await testHelpers.sendMessage(page, 'Hello, world!');
|
|
|
|
// Wait for user message to appear
|
|
await page.waitForSelector('[data-testid="message"][data-sender="user"]', { timeout: 5000 });
|
|
await expect(page.locator('[data-testid="message"][data-sender="user"]')).toBeVisible();
|
|
});
|
|
|
|
test('should receive a response', async ({ page }) => {
|
|
await testHelpers.sendMessage(page, 'Test message');
|
|
|
|
// Wait for agent response
|
|
await page.waitForSelector('[data-testid="message"][data-sender="agent"]', { timeout: 15000 });
|
|
await expect(page.locator('[data-testid="message"][data-sender="agent"]')).toBeVisible();
|
|
});
|
|
});
|