diff --git a/scripts/real-app-multi-tab-e2e.js b/scripts/real-app-multi-tab-e2e.js new file mode 100644 index 0000000..3eb423e --- /dev/null +++ b/scripts/real-app-multi-tab-e2e.js @@ -0,0 +1,92 @@ +const { _electron: electron } = require('playwright'); +const path = require('path'); +const fs = require('fs'); + +async function runRealETE() { + console.log('=== REAL LIVE ELECTRON SCREEN VERIFICATION ==='); + const outDir = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots/live_production_verified'; + if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true }); + + const app = await electron.launch({ + executablePath: require('electron'), + args: ['.'], + cwd: path.resolve('apps/desktop'), + env: Object.assign({}, process.env, { NODE_ENV: 'production' }) + }); + + const pid = app.process().pid; + console.log('[1] Real Electron Process Active, PID:', pid); + const window = await app.firstWindow({ timeout: 30000 }); + await window.waitForLoadState('domcontentloaded'); + await window.waitForTimeout(2500); + + // 1. Dashboard + const shotDash = path.join(outDir, '11_real_electron_dashboard.png'); + await window.screenshot({ path: shotDash }); + console.log('[2] Captured Dashboard', shotDash); + + // 2. Click History tab ('히스토리': \uD788\uC2A4\uD1A0\uB9AC) + await window.evaluate(() => { + const el = Array.from(document.querySelectorAll('div, button, a, span')).find( + q => q.innerText && q.innerText.trim() === '\uD788\uC2A4\uD1A0\uB9AC' + ); + if (el) el.click(); + }); + await window.waitForTimeout(1500); + const shotHistory = path.join(outDir, '12_real_electron_history.png'); + await window.screenshot({ path: shotHistory }); + console.log('[3] Captured History', shotHistory); + + // 3. Click Dictionary tab ('사전': \uC0AC\uC804) + await window.evaluate(() => { + const el = Array.from(document.querySelectorAll('div, button, a, span')).find( + q => q.innerText && q.innerText.trim() === '\uC0AC\uC804' + ); + if (el) el.click(); + }); + await window.waitForTimeout(1500); + const shotDict = path.join(outDir, '13_real_electron_dictionary.png'); + await window.screenshot({ path: shotDict }); + console.log('[4] Captured Dictionary', shotDict); + + // 4. Click Commands tab ('명령어': \uBA85\uB839\uC5B4) + await window.evaluate(() => { + const el = Array.from(document.querySelectorAll('div, button, a, span')).find( + q => q.innerText && q.innerText.trim() === '\uBA85\uB839\uC5B4' + ); + if (el) el.click(); + }); + await window.waitForTimeout(1500); + const shotCmd = path.join(outDir, '14_real_electron_commands.png'); + await window.screenshot({ path: shotCmd }); + console.log('[5] Captured Commands', shotCmd); + + // 5. Click Meeting tab ('회의': \uD68C\uC758) + await window.evaluate(() => { + const el = Array.from(document.querySelectorAll('div, button, a, span')).find( + q => q.innerText && q.innerText.trim() === '\uD68C\uC758' + ); + if (el) el.click(); + }); + await window.waitForTimeout(1500); + const shotMeet = path.join(outDir, '15_real_electron_meeting.png'); + await window.screenshot({ path: shotMeet }); + console.log('[6] Captured Meeting Mode', shotMeet); + + // 6. Click Voice Conversation tab ('대화': \uB300\uD654) + await window.evaluate(() => { + const el = Array.from(document.querySelectorAll('div, button, a, span')).find( + q => q.innerText && q.innerText.trim() === '\uB300\uD654' + ); + if (el) el.click(); + }); + await window.waitForTimeout(1500); + const shotConv = path.join(outDir, '16_real_electron_conversation.png'); + await window.screenshot({ path: shotConv }); + console.log('[7] Captured Voice Conversation', shotConv); + + await app.close(); + console.log('=== ALL REAL SCREENS VERIFIED SUCCESSFULLY ==='); +} + +runRealETE().then(() => process.exit(0)).catch(e => { console.error('E2E ERROR:', e); process.exit(1); }); \ No newline at end of file