- Remove unused imports (run, trackDuration, PerformanceTracker, ConfigManager, disconnectDb) flagged by ESLint - Remove unused isSlow variable in performance-monitor catch block - Add eslint-disable for require() in Playwright JS script - Fix logger-performance test flakiness by using vi.resetModules() with dynamic imports to prevent cached logger references across test files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
599 B
JavaScript
20 lines
599 B
JavaScript
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
const { _electron: electron } = require('playwright')
|
|
|
|
;(async () => {
|
|
const electronApp = await electron.launch({
|
|
args: ['.', '--no-sandbox', '--disable-gpu']
|
|
})
|
|
|
|
// Get the first window that the app opens
|
|
const window = await electronApp.firstWindow()
|
|
|
|
// Try to bypass auth and navigate to cleaner page if possible, but we don't know the exact DOM
|
|
await window.waitForTimeout(5000)
|
|
|
|
await window.screenshot({ path: 'tests/playwright/screenshot.png' })
|
|
console.log('Took screenshot')
|
|
|
|
await electronApp.close()
|
|
})()
|