2026-03-10 01:06:12 +00:00
|
|
|
// Integration test for helpyourneighbour project
|
2026-03-12 01:14:36 +00:00
|
|
|
import { test, expect } from '@playwright/test';
|
2026-03-06 15:39:11 +00:00
|
|
|
|
2026-03-10 01:06:12 +00:00
|
|
|
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();
|
2026-03-06 15:39:11 +00:00
|
|
|
});
|