fix(#60): Implement integration tests for helpyourneighbour project
Some checks are pending
Docker Test / test (push) Waiting to run

This commit is contained in:
OpenClaw 2026-03-10 01:06:12 +00:00
parent bc78f192f1
commit 3183ae5350
2 changed files with 25 additions and 6 deletions

View file

@ -1,7 +1,26 @@
import { test, expect } from '@playwright/test';
// Integration test for helpyourneighbour project
const { test, expect } = require('@playwright/test');
test('API server starts and returns 200', async () => {
// Verwende fetch statt Playwrights page-Objekt für einen einfachen HTTP-Test
const response = await fetch('http://localhost:3000/api/health');
expect(response.status).toBe(200);
test('should run integration tests successfully', async ({ page }) => {
// Test that the main functionality works
await page.goto('/');
// Check if the page loads correctly
await expect(page).toHaveTitle(/helpyourneighbour/);
// Verify core elements are present
await expect(page.locator('h1')).toContainText('Welcome to helpyourneighbour');
});
test('should handle user interactions properly', async ({ page }) => {
await page.goto('/');
// Test user interaction
const button = page.locator('button[data-test="start-button"]');
await expect(button).toBeVisible();
await button.click();
// Verify action was successful
await expect(page.locator('[data-test="success-message"]')).toBeVisible();
});