fix(#60): Implement integration tests for helpyourneighbour project
Some checks are pending
Docker Test / test (push) Waiting to run
Some checks are pending
Docker Test / test (push) Waiting to run
This commit is contained in:
parent
bc78f192f1
commit
3183ae5350
2 changed files with 25 additions and 6 deletions
|
|
@ -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();
|
||||
});
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Autonomy Discovery
|
||||
|
||||
Generated: 2026-03-09T15:04:00Z
|
||||
Generated: 2026-03-09T23:35:21Z
|
||||
|
||||
## Git Status
|
||||
M docs/runtime/autonomy_discovery_helpyourneighbour.md
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue