admin felület különválasztva
This commit is contained in:
25
frontend_app/tests/e2e/remote_sanity.spec.js
Normal file
25
frontend_app/tests/e2e/remote_sanity.spec.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { test, expect, chromium } from '@playwright/test';
|
||||
|
||||
test('Távoli böngésző kapcsolat és internet elérés tesztje', async () => {
|
||||
// Connect to the remote Chrome instance via CDP (Chrome DevTools Protocol)
|
||||
const browser = await chromium.connectOverCDP('http://100.93.27.29:3030');
|
||||
|
||||
const context = await browser.newContext();
|
||||
const page = await context.newPage();
|
||||
|
||||
// Megkíséreljük betölteni az éles/staging oldalt a külső szerverről
|
||||
await page.goto('https://app.servicefinder.hu', { timeout: 30000 });
|
||||
|
||||
// Várunk egy kicsit, hogy biztosan betöltsön
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Készítünk egy képernyőfotót a bizonyításhoz
|
||||
await page.screenshot({ path: 'test-results/remote-sanity-proof.png', fullPage: true });
|
||||
|
||||
// Alapvető ellenőrzés
|
||||
const title = await page.title();
|
||||
console.log('A távoli böngésző ezt az oldalcímet látja: ', title);
|
||||
expect(title).not.toBeNull();
|
||||
|
||||
await browser.close();
|
||||
});
|
||||
Reference in New Issue
Block a user