diff --git a/README.md b/README.md index a2ebc50..7fe5c6c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ Use number keys to choose radial-menu actions and **Esc** to close the menu. Closing the window keeps FileBow in the system tray by default, so the shortcuts remain available for selected Explorer files. Enable **Start with Windows** to launch it automatically, or choose **Quit** from the tray menu to exit. -![FileBow conversion options in light mode](store/screenshots/04-Convert-Light.png) +| Convert | Tools | +| --- | --- | +| ![FileBow radial conversion menu](store/screenshots/05-Radial-Convert.png) | ![FileBow radial tools menu](store/screenshots/06-Radial-Tools.png) | ## Local by default diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 26f5162..25572d2 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -50,6 +50,7 @@ $env:FILEBOW_EXECUTABLE = (Resolve-Path out/FileBow-win32-x64/FileBow.exe).Path pnpm test:ui .venv/Scripts/python.exe scripts/verify-msix.py out/msix/FileBow_1.0.0.0_x64_Store.msix --allow-unsigned --identity store/identity.store.json node scripts/capture-store.cjs +node scripts/capture-wheel.cjs ``` The worker tests check real conversions, encryption, image transparency, estimates, filename collisions and unchanged originals. UI checks use an isolated profile with global shortcuts and drag monitoring disabled. Screenshot capture uses sample files only. Local logs are in `test-results`. diff --git a/scripts/capture-wheel.cjs b/scripts/capture-wheel.cjs new file mode 100644 index 0000000..004a4e2 --- /dev/null +++ b/scripts/capture-wheel.cjs @@ -0,0 +1,38 @@ +const { _electron: electron } = require('playwright'); +const fs = require('node:fs/promises'); +const path = require('node:path'); +const root = path.resolve(__dirname, '..'); + +(async () => { + const output = path.join(root, 'store/screenshots'); + await fs.mkdir(output, { recursive: true }); + await fs.mkdir(path.join(root, 'test-results'), { recursive: true }); + const profile = await fs.mkdtemp(path.join(root, 'test-results/wheel-profile-')); + const sample = path.join(profile, 'Sample.png'); + await fs.copyFile(path.join(root, 'assets/icon.png'), sample); + const app = await electron.launch({ + executablePath: path.join(root, 'out/FileBow-win32-x64/FileBow.exe'), + args: [], env: { ...process.env, FILEBOW_TEST: '1', FILEBOW_USER_DATA: profile }, + }); + try { + const main = await app.firstWindow(); + await main.waitForSelector('#pick'); + await main.evaluate(file => window.orbit.selectFiles([file]), sample); + const opened = app.waitForEvent('window'); + await main.locator('#wheel-open').click(); + const wheel = await opened; + await wheel.waitForSelector('.action'); + for (const [mode, filename] of [['quick', '05-Radial-Convert.png'], ['tools', '06-Radial-Tools.png']]) { + if (mode === 'tools') { + await wheel.keyboard.press('Escape'); + await main.locator('#tab-tools').click(); + await main.locator('#wheel-open').click(); + } + await wheel.waitForFunction(expected => document.querySelector('#mode').textContent === expected, mode === 'tools' ? 'TOOLS' : 'CONVERT'); + await wheel.mouse.move(0, 0); + await wheel.locator('#wheel').screenshot({ path: path.join(output, filename), omitBackground: true, animations: 'disabled' }); + console.log(path.join(output, filename)); + } + await wheel.keyboard.press('Escape'); + } finally { await app.close(); } +})().catch(error => { console.error(error); process.exitCode = 1; }); diff --git a/store/screenshots/05-Radial-Convert.png b/store/screenshots/05-Radial-Convert.png new file mode 100644 index 0000000..80bd959 Binary files /dev/null and b/store/screenshots/05-Radial-Convert.png differ diff --git a/store/screenshots/06-Radial-Tools.png b/store/screenshots/06-Radial-Tools.png new file mode 100644 index 0000000..eae028a Binary files /dev/null and b/store/screenshots/06-Radial-Tools.png differ