Fix stale app UI (supabase) & overall E2E test infra improvements (#337)

Fixes #269
This commit is contained in:
Will Chen
2025-06-04 23:07:59 -07:00
committed by GitHub
parent 7f410ce830
commit 16bf0828f5
21 changed files with 203 additions and 96 deletions

View File

@@ -3,6 +3,7 @@ import log from "electron-log";
import { createLoggedHandler } from "./safe_handle";
import { readSettings } from "../../main/settings"; // Assuming settings are read this way
import { UserBudgetInfo, UserBudgetInfoSchema } from "../ipc_types";
import { IS_TEST_BUILD } from "../utils/test_utils";
const logger = log.scope("pro_handlers");
const handle = createLoggedHandler(logger);
@@ -13,6 +14,10 @@ export function registerProHandlers() {
// This method should try to avoid throwing errors because this is auxiliary
// information and isn't critical to using the app
handle("get-user-budget", async (): Promise<UserBudgetInfo | null> => {
if (IS_TEST_BUILD) {
// Avoid spamming the API in E2E tests.
return null;
}
logger.info("Attempting to fetch user budget information.");
const settings = readSettings();