helpyourneighbour/backend/tests/integration-test.spec.js

26 lines
839 B
JavaScript
Raw Permalink Normal View History

// Integration test for helpyourneighbour project
import { test, expect } from '@playwright/test';
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();
});