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

@@ -5,6 +5,7 @@ import {
SupabaseManagementAPIError,
} from "@dyad-sh/supabase-management-js";
import log from "electron-log";
import { IS_TEST_BUILD } from "../ipc/utils/test_utils";
const logger = log.scope("supabase_management_client");
@@ -122,6 +123,10 @@ export async function getSupabaseClient(): Promise<SupabaseManagementAPI> {
export async function getSupabaseProjectName(
projectId: string,
): Promise<string> {
if (IS_TEST_BUILD) {
return "Fake Supabase Project";
}
const supabase = await getSupabaseClient();
const projects = await supabase.getProjects();
const project = projects?.find((p) => p.id === projectId);