Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): isolate preview keyboard input #9522

Closed0bkevin(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/9522/headopened View on GitHub

Showing 14 changed files with 92 additions and 2 deletions (loading 12).

x
0 of 14 viewed, 14 left
77 additions and 0 deletionsapps/desktop/src/ipc/methods/preview.test.tsModified
View file
@@ -136,4 +136,81 @@
}),
).toThrow();
});
+​
+ effectIt.effect("returns fulfilled automation press results for known keyboard failures", () =>
+ Effect.gen(function* () {
+ const errors = [
+ new PreviewManager.PreviewAutomationKeyboardWindowNotFocusedError({
+ tabId: "tab-1",
+ webContentsId: 41,
+ }),
+ new PreviewManager.PreviewAutomationKeyboardFocusedFrameUnsupportedError({
+ tabId: "tab-1",
+ webContentsId: 41,
+ }),
+ new PreviewManager.PreviewAutomationKeyboardDeliveryNotConfirmedError({
+ tabId: "tab-1",
+ webContentsId: 41,
+ }),
+ new PreviewManager.PreviewAutomationTargetChangedError({
+ operation: "press",
+ tabId: "tab-1",
+ webContentsId: 41,
+ }),
+ ];
+​
+ for (const error of errors) {
+ const manager = PreviewManager.PreviewManager.of({
+ automationPress: () => Effect.fail(error),