import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' import { _electron as electron, expect, test } from '@playwright/test' const here = dirname(fileURLToPath(import.meta.url)) const MAIN = join(here, '..', 'out', 'main', 'index.js') // Opt-in only (GITEA_LIVE=1). Launches WITHOUT COMMITEA_E2E so the main process // reconciles the real repo via .env.local, and asserts real issues render. test.describe('live backlog', () => { test('The pot shows real gitea issues', async () => { test.skip(!process.env.GITEA_LIVE, 'GITEA_LIVE not set — opt-in live test') const app = await electron.launch({ args: [MAIN], env: { ...process.env } }) const win = await app.firstWindow() await win.waitForLoadState('domcontentloaded') await win.getByRole('navigation', { name: 'Primary' }).getByRole('button', { name: 'The pot' }).click() // our filed dogfood issue #1 (now closed → Done column) — real gitea data await expect(win.getByText('Gitea read client behind an injected fetch')).toBeVisible({ timeout: 15000 }) await win.screenshot({ path: join(here, '.artifacts', 'screens', 'live-board.png'), fullPage: true, animations: 'disabled', }) await app.close() }) })