test(desktop): add automated Playwright Electron real-app E2E verification suites
This commit is contained in:
parent
63b97c4761
commit
9b2b83b2ab
3 changed files with 158 additions and 0 deletions
31
scripts/capture-desktop-tabs.js
Normal file
31
scripts/capture-desktop-tabs.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
const { _electron: electron } = require('playwright');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
async function testTabs() {
|
||||
const outDir = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots/live_production_verified';
|
||||
const app = await electron.launch({
|
||||
executablePath: require('electron'),
|
||||
args: ['.'],
|
||||
cwd: path.resolve('apps/desktop'),
|
||||
env: Object.assign({}, process.env, { NODE_ENV: 'production' })
|
||||
});
|
||||
|
||||
const win = await app.firstWindow({timeout: 30000});
|
||||
await win.waitForLoadState('domcontentloaded');
|
||||
await win.waitForTimeout(2000);
|
||||
|
||||
console.log('Clicking 시스템 설정 button...');
|
||||
const sysBtn = await win.getByText('시슐텼 설정', { exact: true });
|
||||
if (sysBtn) {
|
||||
await sysBtn.click();
|
||||
await win.waitForTimeout(1500);
|
||||
await win.screenshot({ path: path.join(outDir, '10_electron_system_settings_modal.png') });
|
||||
console.log('Saved 10_electron_system_settings_modal.png');
|
||||
}
|
||||
|
||||
await app.close();
|
||||
console.log('DONE');
|
||||
}
|
||||
|
||||
testTabs().then(() => process.exit(0)).catch(e => { console.error(e); process.exit(1); });
|
||||
Loading…
Add table
Add a link
Reference in a new issue