36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
import { test, expect, chromium } from '@playwright/test';
|
|
|
|
test('Phase 1 - Landing page visual capture', async () => {
|
|
// Connect to the remote Chrome instance on faktor01 via CDP
|
|
const browser = await chromium.connectOverCDP('http://100.93.27.29:3030');
|
|
|
|
const context = await browser.newContext({
|
|
viewport: { width: 1440, height: 900 },
|
|
});
|
|
const page = await context.newPage();
|
|
|
|
// Load the production/staging frontend
|
|
await page.goto('https://app.servicefinder.hu', { timeout: 30000 });
|
|
|
|
// Wait for full page load including images
|
|
await page.waitForLoadState('networkidle');
|
|
|
|
// Small extra wait for the background image to render
|
|
await page.waitForTimeout(2000);
|
|
|
|
// Take a full-page screenshot
|
|
await page.screenshot({
|
|
path: 'test-results/landing-phase1.png',
|
|
fullPage: true,
|
|
});
|
|
|
|
// Basic sanity: page should have content
|
|
const bodyText = await page.textContent('body');
|
|
expect(bodyText).toContain('SERVICE');
|
|
expect(bodyText).toContain('FINDER');
|
|
|
|
console.log('✅ Landing page screenshot saved as test-results/landing-phase1.png');
|
|
|
|
await browser.close();
|
|
});
|