Refactor infra tests, clean E2E step suites, and fix TS in tests

This commit is contained in:
2025-11-30 10:58:49 +01:00
parent af14526ae2
commit f8a1fbeb50
43 changed files with 883 additions and 2159 deletions

View File

@@ -1,5 +1,10 @@
import { ElectronApplication } from '@playwright/test';
type IpcHandlerResult = {
error?: string;
[key: string]: unknown;
};
export interface IPCTestResult {
channel: string;
success: boolean;
@@ -41,10 +46,12 @@ export class IPCVerifier {
});
});
const typed: IpcHandlerResult = result as IpcHandlerResult;
return {
channel,
success: !result.error,
error: result.error,
success: !typed.error,
error: typed.error,
duration: Date.now() - start,
};
} catch (error) {
@@ -79,10 +86,12 @@ export class IPCVerifier {
});
});
const typed: IpcHandlerResult = result as IpcHandlerResult;
return {
channel,
success: (result && !result.error) || typeof result === 'object',
error: result && result.error,
success: !typed.error,
error: typed.error,
duration: Date.now() - start,
};
} catch (error) {
@@ -118,10 +127,12 @@ export class IPCVerifier {
});
});
const typed: IpcHandlerResult = result as IpcHandlerResult;
return {
channel,
success: !result.error,
error: result.error,
success: !typed.error,
error: typed.error,
duration: Date.now() - start,
};
} catch (error) {