This repository was archived by the owner on Jul 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-overlay-simple.js
More file actions
65 lines (55 loc) · 1.76 KB
/
Copy pathtest-overlay-simple.js
File metadata and controls
65 lines (55 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const { chromium } = require('@playwright/test');
const BASE_URL = process.env.BASE_URL || 'http://localhost:3000';
(async () => {
let browser;
try {
console.log('Launching browser...');
browser = await chromium.launch({
headless: true,
timeout: 10000
});
const context = await browser.newContext();
const page = await context.newPage();
// Set page timeout
page.setDefaultTimeout(10000);
console.log(`Navigating to ${BASE_URL}...`);
try {
await page.goto(BASE_URL, {
waitUntil: 'domcontentloaded',
timeout: 10000
});
console.log('✅ Page loaded');
} catch (e) {
console.error('❌ Failed to load page:', e.message);
process.exit(1);
}
// Quick check for overlay
try {
const overlayExists = await page.locator('#start-overlay').count() > 0;
console.log(`Start Overlay in DOM: ${overlayExists ? 'YES ✅' : 'NO ❌'}`);
if (overlayExists) {
const isVisible = await page.locator('#start-overlay').isVisible();
console.log(`Start Overlay Visible: ${isVisible ? 'YES ✅' : 'NO ❌'}`);
}
} catch (e) {
console.log('Error checking overlay:', e.message);
}
// Check for debug panel
try {
const debugPanelExists = await page.locator('text=Audio Debug Panel').count() > 0;
console.log(`Audio Debug Panel Exists: ${debugPanelExists ? 'YES ✅' : 'NO ❌'}`);
} catch (e) {
console.log('Error checking debug panel:', e.message);
}
// Get page title
const title = await page.title();
console.log(`Page Title: "${title}"`);
} catch (error) {
console.error('Test failed:', error.message);
process.exit(1);
} finally {
if (browser) {
await browser.close();
}
}
})();