Switch FileBow to English and present the app in the public README

This commit is contained in:
nordik committed 2026-10-27 01:39:24 +01:00
1 parent 2b897267d1
commit 84164251e3
36 files changed
+346 -280

No files matched your search

+13 -4
View File
@@ -16,11 +16,13 @@ const root=path.resolve(__dirname,'..'),out=path.join(root,'test-results');
try{
const page=await app.firstWindow();await page.waitForSelector('#pick');
await page.screenshot({path:path.join(out,'01-home.png')});
assert.equal(await page.locator('html').getAttribute('lang'),'en');
assert.equal(await app.evaluate(({app})=>app.getLocale()),'en-US');
const state=await page.evaluate(()=>window.orbit.state());assert.equal(state.name,'FileBow');assert.ok(state.native.available,state.native.error);
const textFile=path.join(out,'Beispiel.txt');await fs.writeFile(textFile,'FileBow\nGrüße aus Köln.\nLokale Dateikonvertierung.');
await page.evaluate(file=>window.orbit.selectFiles([file]),textFile);
await page.locator('[data-action="convert-pdf"]').click();
await page.waitForFunction(()=>document.querySelector('#recent-list').textContent.includes('Ergebnisdatei(en)'),{timeout:30000});
await page.waitForFunction(()=>document.querySelector('#recent-list').textContent.includes('output file'),{timeout:30000});
let updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success',JSON.stringify(updated.history[0]));
await fs.access(updated.history[0].outputs[0]);
const pdf=updated.history[0].outputs[0];await page.evaluate(file=>window.orbit.selectFiles([file]),pdf);
@@ -40,7 +42,7 @@ const root=path.resolve(__dirname,'..'),out=path.join(root,'test-results');
await edit.waitForSelector('#width',{timeout:30000});await edit.locator('#width').fill('96');await edit.screenshot({path:path.join(out,'02-resize.png')});
await saveDialog(edit);await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));
updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
const compressPromise=app.waitForEvent('window');await page.locator('[data-action="compress"]').click();const compress=await compressPromise;await compress.locator('#quality').fill('65');await compress.waitForFunction(()=>document.querySelector('#estimate').textContent.includes('Voraussichtliche Größe'),null,{timeout:30000});await compress.screenshot({path:path.join(out,'06-compression.png')});await saveDialog(compress);
const compressPromise=app.waitForEvent('window');await page.locator('[data-action="compress"]').click();const compress=await compressPromise;await compress.locator('#quality').fill('65');await compress.waitForFunction(()=>document.querySelector('#estimate').textContent.includes('Expected size'),null,{timeout:30000});await compress.screenshot({path:path.join(out,'06-compression.png')});await saveDialog(compress);
await page.waitForFunction(()=>!document.querySelector('#job:not([hidden])'));updated=await page.evaluate(()=>window.orbit.state());assert.equal(updated.history[0].status,'success');
assert.ok(updated.history[0].outputs[0].endsWith('.png'));
await page.locator('#tab-quick').click();
@@ -55,9 +57,16 @@ const root=path.resolve(__dirname,'..'),out=path.join(root,'test-results');
await page.locator('#theme').selectOption('dark');await page.locator('[data-page="history"]').click();await page.screenshot({path:path.join(out,'05-history.png')});
await page.locator('[data-page="about"]').click();
await app.evaluate(({shell})=>{global.__supportUrls=[];shell.openExternal=async url=>{global.__supportUrls.push(url);};});
await page.locator('#support').click();
assert.deepEqual(await app.evaluate(()=>global.__supportUrls),['https://ko-fi.com/E0Z827VO8I']);
assert.equal(await page.locator('aside #support').count(),1);
await page.locator('aside #support').click();
await page.locator('#issues').click();
assert.deepEqual(await app.evaluate(()=>global.__supportUrls),['https://ko-fi.com/E0Z827VO8I','https://git.nordik.dev/nordik/FileBow/issues']);
await page.screenshot({path:path.join(out,'07-about.png')});
const hiddenInTray=await app.evaluate(({BrowserWindow})=>{
const main=BrowserWindow.getAllWindows().find(window=>window.getTitle()==='FileBow');
main.close();return !main.isDestroyed()&&!main.isVisible();
});
assert.equal(hiddenInTray,true,'Closing the main window should keep the app running in the tray');
assert.deepEqual(errors,[]);await fs.writeFile(path.join(out,'ui-result.json'),JSON.stringify({passed:true,native:state.native,history:updated.history.map(x=>({label:x.label,status:x.status})),errors},null,2));
console.log('UI smoke passed: startup, native bridge, conversion, PDF passwords, combining, compression, editor, radial menu, themes, history.');
}finally{await app.close();}